- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 26 for lifespan (0.05 seconds)
-
tests/test_router_events.py
sub_router = APIRouter(lifespan=sub_router_lifespan) router = APIRouter(lifespan=router_lifespan) app = FastAPI(lifespan=lifespan) router.include_router(sub_router) app.include_router(router) with TestClient(app) as client: assert client.app_state == {"router": True} @pytest.mark.filterwarnings(Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.7K bytes - Click Count (0) -
docs/de/llm-prompt.md
* the form body: der Formularbody * the header: der Header * the headers (plural): die Header * in headers (plural): in Headern * the forwarded header: der Forwarded-Header * the lifespan event: das Lifespan-Event * the lock: der Lock * the locking: das Locking * the mobile application: die Mobile-Anwendung * the model object: das Modellobjekt * the mounting: das Mounten * mounted: gemountet
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Dec 29 18:54:20 GMT 2025 - 9.8K bytes - Click Count (0) -
docs/en/docs/_llm-test.md
* the cookie parameter * the header parameter * the form parameter * the function parameter * the event * the startup event * the startup of the server * the shutdown event * the lifespan event * the handler * the event handler * the exception handler * to handle * the model * the Pydantic model * the data model * the database model * the form model * the model object
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 11K bytes - Click Count (0) -
docs/en/docs/deployment/https.md
The domains are securely verified and the certificates are generated automatically. This also allows automating the renewal of these certificates.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 14K bytes - Click Count (0) -
docs/ru/docs/advanced/events.md
Вы можете прочитать больше про обработчики `lifespan` в Starlette в [документации Starlette по Lifespan](https://www.starlette.dev/lifespan/). Включая то, как работать с состоянием lifespan, которое можно использовать в других частях вашего кода. /// ## Подприложения { #sub-applications }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 12.6K bytes - Click Count (0) -
docs/ja/docs/_llm-test.md
* フォームボディ * ファイルボディ * 関数本体 * パラメータ * ボディパラメータ * パスパラメータ * クエリパラメータ * Cookie パラメータ * ヘッダーパラメータ * フォームパラメータ * 関数パラメータ * イベント * 起動イベント * サーバーの起動 * シャットダウンイベント * lifespan イベント * ハンドラ * イベントハンドラ * 例外ハンドラ * 処理する * モデル * Pydantic モデル * データモデル * データベースモデル * フォームモデル * モデルオブジェクト * クラス * 基底クラス * 親クラス * サブクラス * 子クラス * 兄弟クラス
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 13.5K bytes - Click Count (0) -
docs/uk/docs/advanced/events.md
## Тривалість життя { #lifespan } Ви можете визначити цю логіку запуску і вимкнення за допомогою параметра `lifespan` застосунку `FastAPI` та «менеджера контексту» (зараз покажу, що це). Почнемо з прикладу, а потім розберемо детально. Ми створюємо асинхронну функцію `lifespan()` з `yield` так: {* ../../docs_src/events/tutorial003_py310.py hl[16,19] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 12.2K bytes - Click Count (0) -
docs/ja/docs/advanced/events.md
そのため、現在は上で説明したとおり `lifespan` を使うことが推奨されています。 ## 技術詳細 { #technical-details } 技術が気になる方への細かな詳細です。🤓 内部的には、ASGI の技術仕様において、これは [Lifespan プロトコル](https://asgi.readthedocs.io/en/latest/specs/lifespan.html) の一部であり、`startup` と `shutdown` というイベントが定義されています。 /// info | 情報 Starlette の `lifespan` ハンドラについては、[Starlette の Lifespan ドキュメント](https://www.starlette.dev/lifespan/)で詳しく読むことができます。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 9.9K bytes - Click Count (0) -
docs/en/docs/deployment/docker.md
``` ⛔️ **Shell** form: ```Dockerfile # ⛔️ Don't do this CMD fastapi run app/main.py --port 80 ``` Make sure to always use the **exec** form to ensure that FastAPI can shutdown gracefully and [lifespan events](../advanced/events.md) are triggered. You can read more about it in the [Docker docs for shell and exec form](https://docs.docker.com/reference/dockerfile/#shell-and-exec-form).
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 28.3K bytes - Click Count (1) -
docs/ko/docs/deployment/docker.md
CMD ["fastapi", "run", "app/main.py", "--port", "80"] ``` ⛔️ **Shell** form: ```Dockerfile # ⛔️ 이렇게 하지 마세요 CMD fastapi run app/main.py --port 80 ``` FastAPI가 정상적으로 종료(graceful shutdown)되고 [lifespan 이벤트](../advanced/events.md)가 트리거되도록 하려면, 항상 **exec** form을 사용하세요. 자세한 내용은 [shell and exec form에 대한 Docker 문서](https://docs.docker.com/reference/dockerfile/#shell-and-exec-form)를 참고하세요.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 32.6K bytes - Click Count (0)