Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for common_parameters (0.07 sec)

  1. docs/en/docs/tutorial/dependencies/index.md

    * Get the result from your function.
    * Assign that result to the parameter in your *path operation function*.
    
    ```mermaid
    graph TB
    
    common_parameters(["common_parameters"])
    read_items["/items/"]
    read_users["/users/"]
    
    common_parameters --> read_items
    common_parameters --> read_users
    ```
    
    This way you write shared code once and **FastAPI** takes care of calling it for your *path operations*.
    
    /// check
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    Then, we can change the dependency "dependable" `common_parameters` from above to the class `CommonQueryParams`:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[11:15] *}
    
    Pay attention to the `__init__` method used to create the instance of the class:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[12] *}
    
    ...it has the same parameters as our previous `common_parameters`:
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 6.7K bytes
    - Viewed (0)
Back to top