Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Wright (0.17 sec)

  1. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python hl_lines="5-6"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    !!! tip
        You can use `async` or regular functions.
    
        **FastAPI** will do the right thing with each, the same as with normal dependencies.
    
    ## A dependency with `yield` and `try`
    
    If you use a `try` block in a dependency with `yield`, you'll receive any exception that was thrown when using the dependency.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
Back to top