- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for putString (0.16 sec)
-
docs/en/docs/advanced/events.md
We create an async function `lifespan()` with `yield` like this: ```Python hl_lines="16 19" {!../../../docs_src/events/tutorial003.py!} ``` Here we are simulating the expensive *startup* operation of loading the model by putting the (fake) model function in the dictionary with machine learning models before the `yield`. This code will be executed **before** the application **starts taking requests**, during the *startup*.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0)