Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for declarations (0.15 sec)

  1. docs/en/docs/tutorial/background-tasks.md

    ## Using `BackgroundTasks`
    
    First, import `BackgroundTasks` and define a parameter in your *path operation function* with a type declaration of `BackgroundTasks`:
    
    ```Python hl_lines="1  13"
    {!../../../docs_src/background_tasks/tutorial001.py!}
    ```
    
    **FastAPI** will create the object of type `BackgroundTasks` for you and pass it as that parameter.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
Back to top