コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 6 of about 6 for Events (0.004 sec.)
Lifespan Events 12411
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 ... ync def predict ( x : float ): result = ml_models [ "answer_to_everything" ]( 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 ... f you provide a lifespan parameter, startup and shutdown event handlers will no longer be called. It's all lifespan or all events, not both. You can probably skip this part. There's an alternative way to define this logic to be executed during startup ... e curious nerds. ? Underneath, in the ASGI technical specification, this is part of the Lifespan Protocol , and it defines events called startup and shutdown . Info You can read more about the Starlette lifespan handlers in Starlette's Lifespan' docs . ...
https://man.mtool.work/fastapi/0.115/advanced/events/
OpenAPI Callbacks 9998
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 ... one app to the next. It could be just one or two lines of code, like: callback_url = "https://example.com/api/v1/invoices/events/" httpx . post ( callback_url , json = { "description" : "Invoice paid" , "paid" : True }) But possibly the most important ... he external developer) sends a request to your API to: https://yourapi.com/invoices/?callback_url=https://www.external.org/events with a JSON body of: { "id" : "2expen51ve" , "customer" : "Mr. Richie Rich" , "total" : "9999" } then your API will proces ... nvoice, and at some point later, send a callback request to the callback_url (the external API ): https://www.external.org/events/invoices/2expen51ve with a JSON body containing something like: { "description" : "Payment celebration" , "paid" : true } ...
https://man.mtool.work/fastapi/0.115/advanced/openapi-callbacks/
Release Notes 9304
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 ... olo . ? Update Sponsors badges. PR #13271 by @tiangolo . ♻️ Fix notify_translations.py empty env var handling for PR label events vs workflow_dispatch. PR #13272 by @tiangolo . ♻️ Refactor and move scripts/notify_translations.py , no need for a custom ... anslation for docs/uk/docs/fastapi-cli.md . PR #13020 by @ykertytsky . ? Add Chinese translation for docs/zh/docs/advanced/events.md . PR #12512 by @ZhibangYue . ? Add Russian translation for /docs/ru/docs/tutorial/sql-databases.md . PR #13079 by @alv2 ... cludes in docs/en/docs/advanced/openapi-webhooks.md . PR #12605 by @salmantec . ? Update includes in docs/en/docs/advanced/events.md . PR #12604 by @salmantec . ? Update includes in docs/en/docs/advanced/dataclasses.md . PR #12603 by @salmantec . ? Upd ...
https://man.mtool.work/fastapi/0.115/release-notes/
Async Tests 8609
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, ... e 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-li ...
https://man.mtool.work/fastapi/0.115/advanced/async-tests/
Testing Events: startup - shutdown 7914
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/
OpenAPI Webhooks 6544
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 ... you will send, the body of the request . You also define in some way at which moments your app will send those requests or events. And your users define in some way (for example in a web dashboard somewhere) the URL where your app should send those req ...
https://man.mtool.work/fastapi/0.115/advanced/openapi-webhooks/
PREV 1 NEXT