コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 2 of about 2 for shutdown (0.001 sec.)
Lifespan Events 11228
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 ... re 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). L ... ield , we unload the model. This code will be executed after the application finishes handling requests , right before the shutdown . This could, for example, release resources like memory or a GPU. Tip The shutdown would happen when you are stopping the ... ]( x ) return { "result" : result } Alternative Events (deprecated) Warning The recommended way to handle the startup and shutdown is using the lifespan parameter of the FastAPI app as described above. If you provide a lifespan parameter, startup and sh ...
https://man.mtool.work/fastapi/0.115/advanced/events/
Testing Events: startup - shutdown 7485
Testing Events: startup - shutdown Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . When you need your event handlers ( startup and shutdown ) to run in your tests, ...
https://man.mtool.work/fastapi/0.115/advanced/testing-events/
PREV 1 NEXT