コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 3 of about 3 for lifespan (0.004 sec.)
Lifespan Events 11905
Lifespan Events Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define logic (code) that should be executed before the application starts up . This means t ... ore the application starts taking requests, and right after it finishes handling requests, it covers the whole application lifespan (the word "lifespan" will be important in a second ?). This can be very useful for setting up resources that you need to u ... requests are handled, but only right before the application starts receiving requests, not while the code is being loaded. Lifespan You can define this startup and shutdown logic using the lifespan parameter of the FastAPI app, and a "context manager" (I ... 'll show you what that is in a second). Let's start with an example and then see it in detail. We create an async function lifespan() with yield like this: Python 3.8+ from contextlib import asynccontextmanager from fastapi import FastAPI def fake_answer ...
https://man.mtool.work/fastapi/0.115/advanced/events/
Async Tests 8185
Async Tests Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You have already seen how to test your FastAPI applications using the provided TestClient . Up to now, ... that we're using async/await with the new AsyncClient - the request is asynchronous. Warning If your application relies on lifespan events, the AsyncClient won't trigger these events. To ensure they are triggered, use LifespanManager from florimondmanca/ ... asgi-lifespan . Other Asynchronous Function Calls As the testing function is now asynchronous, you can now also call (and await ) other ...
https://man.mtool.work/fastapi/0.115/advanced/async-tests/
Release Notes 7775
Release Notes Latest Changes 0.115.11 Fixes ? Add docs examples and tests (support) for Annotated custom validations, like AfterValidator , revert #13440 . PR #13442 by @tiangolo . New docs: Query Parameters and String Validations - Custom ... and issues in the documentation. PR #12063 by @svlandeg . ? Add note in Docker docs about ensuring graceful shutdowns and lifespan events with CMD exec form. PR #11960 by @GPla . Translations ? Add Dutch translation for docs/nl/docs/features.md . PR #12 ... allow_inf_nan option for Param and Body classes. PR #11867 by @giunio-prc . ? Ensure that app.include_router merges nested lifespans. PR #9630 by @Lancetnik . Refactors ? Fix typing annotation for semi-internal FastAPI.add_api_route() . PR #10240 by @ord ... .md . PR #10960 by @nilslindemann . ✏️ Fix typos for Spanish documentation. PR #10957 by @jlopezlira . ? Add warning about lifespan functions and backwards compatibility with events. PR #10734 by @jacob-indigo . ✏️ Fix broken link in docs/tutorial/sql-da ...
https://man.mtool.work/fastapi/0.115/release-notes/
PREV 1 NEXT