Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for __init__ (0.25 sec)

  1. docs/en/docs/advanced/advanced-dependencies.md

    ## Parameterize the instance
    
    And now, we can use `__init__` to declare the parameters of the instance that we can use to "parameterize" the dependency:
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. docs/de/docs/advanced/advanced-dependencies.md

    ## Die Instanz parametrisieren
    
    Und jetzt können wir `__init__` verwenden, um die Parameter der Instanz zu deklarieren, die wir zum `Parametrisieren` der Abhängigkeit verwenden können:
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:18:49 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/advanced-dependencies.md

    {!../../../docs_src/dependencies/tutorial011.py!}
    ```
    
    本例中,**FastAPI**  使用 `__call__` 检查附加参数及子依赖项,稍后,还要调用它向*路径操作函数*传递值。
    
    ## 参数化实例
    
    接下来,使用 `__init__` 声明用于**参数化**依赖项的实例参数:
    
    ```Python hl_lines="7"
    {!../../../docs_src/dependencies/tutorial011.py!}
    ```
    
    本例中,**FastAPI** 不使用 `__init__`,我们要直接在代码中使用。
    
    ## 创建实例
    
    使用以下代码创建类实例:
    
    ```Python hl_lines="16"
    {!../../../docs_src/dependencies/tutorial011.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jan 28 18:26:57 GMT 2024
    - 2K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/advanced-dependencies.md

    ## 🔗 👐
    
    & 🔜, 👥 💪 ⚙️ `__init__` 📣 🔢 👐 👈 👥 💪 ⚙️ "🔗" 🔗:
    
    ```Python hl_lines="7"
    {!../../../docs_src/dependencies/tutorial011.py!}
    ```
    
    👉 💼, **FastAPI** 🏆 🚫 ⏱ 👆 ⚖️ 💅 🔃 `__init__`, 👥 🔜 ⚙️ ⚫️ 🔗 👆 📟.
    
    ## ✍ 👐
    
    👥 💪 ✍ 👐 👉 🎓 ⏮️:
    
    ```Python hl_lines="16"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2K bytes
    - Viewed (0)
Back to top