Results of 1 - 8 of about 8 for head (0.002 sec.)
- WebSocket 13067
- WebSocket FastAPI で WebSocket が使用できます。 WebSockets のインストール まず WebSockets のインストールが必要です。 $ pip install websockets ---> 100% WebSocket クライアント 本番環境 本番環境では、React、Vue.js、Angularなどの最新のフレーム
...import FastAPI , WebSocket from fastapi.responses import HTMLResponse app = FastAPI () html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)"> <input type="te...import FastAPI , WebSocket from fastapi.responses import HTMLResponse app = FastAPI () html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)"> <input type="te...import FastAPI , WebSocket from fastapi.responses import HTMLResponse app = FastAPI () html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)"> <input type="te... - https://man.mtool.work/fastapi/0.115/advanced/websockets/
- Templates 9868
- Templates Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can use any template engine you want with FastAPI . A common choice is Jinja2, the same one used by F
...equest and StaticFiles . Writing templates Then you can write a template at templates/item.html with, for example: <html> <head> <title>Item Details</title> <link href=" {{ url_for ( 'static' , path = '/styles.css' ) }} " rel="stylesheet"> </head> <b...l_for() inside of the template, and use it, for example, with the StaticFiles you mounted with the name="static" . <html> <head> <title>Item Details</title> <link href=" {{ url_for ( 'static' , path = '/styles.css' ) }} " rel="stylesheet"> </head> <b... - https://man.mtool.work/fastapi/0.115/advanced/templates/
- Configure Swagger UI 9434
- Configure Swagger UI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can configure some extra Swagger UI parameters . To configure them, pass the swagger_ui_pa
...gger_ui_parameters : current_swagger_ui_parameters . update ( swagger_ui_parameters ) html = f """ <!DOCTYPE html> <html> <head> <link type="text/css" rel="stylesheet" href=" { swagger_css_url } "> <link rel="shortcut icon" href=" { swagger_favicon_u...rl } "> <title> { title } </title> </head> <body> <div id="swagger-ui"> </div> <script src=" { swagger_js_url } "></script> <!-- `SwaggerUIBundle` is now available...sets (Self-Hosting)](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/). """ html = f """ <!DOCTYPE html> <html> <head> <title> { title } </title> <!-- needed for adaptive design --> <meta charset="utf-8"/> <meta name="viewport" content="wid... - https://man.mtool.work/fastapi/0.115/how-to/configure-swagger-ui/
- カスタムレスポンス - HTML、ストリーム、ファイル、その他のレスポンス 9127
- カスタムレスポンス - HTML、ストリーム、ファイル、その他のレスポンス デフォルトでは、 FastAPI は JSONResponse を使ってレスポンスを返します。 レスポンスを直接返す で見たように、 Response を直接返すことでこの挙動をオーバーライドできます。 しか
...onse app = FastAPI () @app . get ( "/items/" , response_class = HTMLResponse ) async def read_items (): return """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ 情報 パラメータ response_clas...esponses import HTMLResponse app = FastAPI () @app . get ( "/items/" ) async def read_items (): html_content = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse ( content...tAPI from fastapi.responses import HTMLResponse app = FastAPI () def generate_html_response (): html_content = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse ( content... - https://man.mtool.work/fastapi/0.115/advanced/custom-response/
- APIRouter class 8368
- APIRouter class Here's the reference information for the APIRouter class, with all its parameters, attributes and methods. You can import the APIRouter class directly from fastapi : from fastapi import APIRouter ::: fastapi.APIRouter option
...s: members: - websocket - include_router - get - put - post - delete - options - head - patch - trace - on_event... - https://man.mtool.work/fastapi/0.115/reference/apirouter/
- FastAPI class 8278
- FastAPI class Here's the reference information for the FastAPI class, with all its parameters, attributes and methods. You can import the FastAPI class directly from fastapi : from fastapi import FastAPI ::: fastapi.FastAPI options: members
...n - webhooks - state - dependency_overrides - openapi - websocket - include_router - get - put - post - delete - options - head - patch - trace - on_event - middleware - exception_handler... - https://man.mtool.work/fastapi/0.115/reference/fastapi/
- 最初のステップ 7320
- 最初のステップ 最もシンプルなFastAPIファイルは以下のようになります: Python 3.8+ from fastapi import FastAPI app = FastAPI () @app . get ( "/" ) async def root (): return { "message" : "Hello World" } これを main.py にコピーします。 ライブサ
...は、HTTPの「メソッド」の1つを指します。 以下のようなものの1つ: POST GET PUT DELETE ...さらによりエキゾチックなもの: OPTIONS HEAD PATCH TRACE HTTPプロトコルでは、これらの「メソッド」の1つ(または複数)を使用して各パスにアクセスできます。 APIを構築すると...ーションも使用できます: @app.post() @app.put() @app.delete() また、よりエキゾチックなものも使用できます: @app.options() @app.head() @app.patch() @app.trace() 豆知識 各オペレーション (HTTPメソッド)は自由に使用できます。 FastAPI は特定の意味づけを強制しま... - https://man.mtool.work/fastapi/0.115/tutorial/first-steps/
- Request Files 6777
- Request Files Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define files to be uploaded by the client using File . Info To receive uploaded files, first
...it has to get the files from the correct part of the body. If you want to read more about these encodings and form fields, head to the MDN web docs for POST . Warning You can declare multiple File and Form parameters in a path operation , but you can... - https://man.mtool.work/fastapi/0.115/tutorial/request-files/
PREV
1
NEXT