Results of 1 - 10 of about 13 for Process (0.002 sec.)
- 追加データ型 14533
- 追加データ型 今までは、以下のような一般的なデータ型を使用してきました: int float str bool しかし、より複雑なデータ型を使用することもできます。 そして、今まで見てきたのと同じ機能を持つことになります: 素晴らしいエディタのサポート 受信したリク
...em_id} " ) async def read_items ( item_id : UUID , start_datetime : datetime = Body (), end_datetime : datetime = Body (), process_after : timedelta = Body (), repeat_at : Union [ time , None ] = Body ( default = None ), ): start_process = start_datetim...e + process_after duration = end_datetime - start_process return { "item_id" : item_id , "start_datetime" : start_datetime , "end_date...time" : end_datetime , "process_after" : process_after , "repeat_at" : repeat_at , "start_process" : start_process , "duration" : duration , } ? Other ver... - https://man.mtool.work/fastapi/0.115/tutorial/extra-data-types/
- ミドルウェア 9906
- ミドルウェア FastAPI アプリケーションにミドルウェアを追加できます。 「ミドルウェア」は、すべての リクエスト に対して、それがあらゆる特定の path operation によって処理される前に機能する関数です。また、すべての レスポンス に対して、それを返す
...Python 3.8+ import time from fastapi import FastAPI , Request app = FastAPI () @app . middleware ( "http" ) async def add_process_time_header ( request : Request , call_next ): start_time = time . perf_counter () response = await call_next ( request )...process_time = time . perf_counter () - start_time response . headers [ "X-Process-Time" ] = str ( process_time ) return response 豆知識 'X-'プレフィックスを使用 してカスタムの独自ヘッダーを追加できます。...成された後、それを返す前にも追加できます。 例えば、リクエストの処理とレスポンスの生成にかかった秒数を含むカスタムヘッダー X-Process-Time を追加できます: Python 3.8+ import time from fastapi import FastAPI , Request app = FastAPI () @app . middleware ( "h... - https://man.mtool.work/fastapi/0.115/tutorial/middleware/
- Server Workers - Gunicorn と Uvicorn 9061
- Server Workers - Gunicorn と Uvicorn 前回のデプロイメントのコンセプトを振り返ってみましょう: セキュリティ - HTTPS 起動時の実行 再起動 レプリケーション(実行中のプロセス数) メモリ 開始前の事前ステップ ここまでのドキュメントのチュートリアルで
...[19514] [INFO] Booting worker with pid: 19514 [19515] [INFO] Booting worker with pid: 19515 [19511] [INFO] Started server process [19511] [19511] [INFO] Waiting for application startup. [19511] [INFO] Application startup complete. [19513] [INFO] Starte...d server process [19513] [19513] [INFO] Waiting for application startup. [19513] [INFO] Application startup complete. [19514] [INFO] Starte...d server process [19514] [19514] [INFO] Waiting for application startup. [19514] [INFO] Application startup complete. [19515] [INFO] Starte... - https://man.mtool.work/fastapi/0.115/deployment/server-workers/
- Pythonの型の紹介 8692
- Pythonの型の紹介 Python 3.6以降 では「型ヒント」オプションがサポートされています。 これらの "型ヒント" は変数の 型 を宣言することができる新しい構文です。(Python 3.6以降) 変数に型を宣言することでエディターやツールがより良いサポートを提供す
...変数を定義してみましょう。 typing から List をインポートします(大文字の L を含む): Python 3.8+ from typing import List def process_items ( items : List [ str ]): for item in items : print ( item ) ? Other versions and variants Python 3.9+ def process_it...力します。 リストはいくつかの内部の型を含む型なので、それらを角括弧で囲んでいます。 Python 3.8+ from typing import List def process_items ( items : List [ str ]): for item in items : print ( item ) ? Other versions and variants Python 3.9+ def process_it...ためのサポートを提供しています。 Tuple と Set tuple と set の宣言も同様です: Python 3.8+ from typing import Set , Tuple def process_items ( items_t : Tuple [ int , int , str ], items_s : Set [ bytes ]): return items_t , items_s ? Other versions and varia... - https://man.mtool.work/fastapi/0.115/python-types/
- FastAPI CLI 8375
- FastAPI CLI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . FastAPI CLI is a command line program that you can use to serve your FastAPI app, manage your FastAPI p
...CTRL+C to quit<b>)</b> <span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Started reloader process <b>[</b><font color="#34E2E2"><b>383138</b></font><b>]</b> using WatchFiles <span style="background-color:#007166"><font c...olor="#D3D7CF"> INFO </font></span> Started server process <b>[</b><font color="#34E2E2"><b>383153</b></font><b>]</b> <span style="background-color:#007166"><font color="#D3D7CF"> I...rogram (e.g. main.py ) and automatically detects the FastAPI instance (commonly named app ), determines the correct import process, and then serves it. For production you would use fastapi run instead. ? Internally, FastAPI CLI uses Uvicorn , a high-per... - https://man.mtool.work/fastapi/0.115/fastapi-cli/
- OpenAPI Webhooks 8269
- OpenAPI Webhooks Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . There are cases where you want to tell your API users that your app could call their app (sending
...a request) with some data, normally to notify of some type of event . This means that instead of the normal process of your users sending requests to your API, it's your API (or your app) that could send requests to their system (to their...API, their app). This is normally called a webhook . Webhooks steps The process normally is that you define in your code what is the message that you will send, the body of the request . You also define... - https://man.mtool.work/fastapi/0.115/advanced/openapi-webhooks/
- チュートリアル - ユーザーガイド 8146
- チュートリアル - ユーザーガイド このチュートリアルは FastAPI のほぼすべての機能の使い方を段階的に紹介します。 各セクションは前のセクションを踏まえた内容になっています。しかし、トピックごとに分割されているので、特定のAPIの要求を満たすようなト
...Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) <span style="color: green;">INFO</span>: Started reloader process [28720] <span style="color: green;">INFO</span>: Started server process [28722] <span style="color: green;">INFO</span>: W... - https://man.mtool.work/fastapi/0.115/tutorial/
- Extending OpenAPI 8041
- Extending OpenAPI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . There are some cases where you might need to modify the generated OpenAPI schema. In this section
...you will see how. The normal process The normal (default) process, is as follows. A FastAPI application (instance) has an .openapi() method that is expected to... - https://man.mtool.work/fastapi/0.115/how-to/extending-openapi/
- OpenAPI Callbacks 7935
- OpenAPI Callbacks Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You could create an API with a path operation that could trigger a request to an external API cre
...ated by someone else (probably the same developer that would be using your API). The process that happens when your API app calls the external API is named a "callback". Because the software that the external develo...events with a JSON body of: { "id" : "2expen51ve" , "customer" : "Mr. Richie Rich" , "total" : "9999" } then your API will process the invoice, and at some point later, send a callback request to the callback_url (the external API ): https://www.externa... - https://man.mtool.work/fastapi/0.115/advanced/openapi-callbacks/
- 最初のステップ 7900
- 最初のステップ 最もシンプルなFastAPIファイルは以下のようになります: Python 3.8+ from fastapi import FastAPI app = FastAPI () @app . get ( "/" ) async def root (): return { "message" : "Hello World" } これを main.py にコピーします。 ライブサ
...Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) <span style="color: green;">INFO</span>: Started reloader process [28720] <span style="color: green;">INFO</span>: Started server process [28722] <span style="color: green;">INFO</span>: W... - https://man.mtool.work/fastapi/0.115/tutorial/first-steps/