Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 99 for dependencies (0.24 sec)

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

    ```Python hl_lines="2-4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    Полученное значение и есть то, что будет внедрено в функцию операции пути и другие зависимости:
    
    ```Python hl_lines="4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    Код, следующий за оператором `yield`, выполняется после доставки ответа:
    
    ```Python hl_lines="5-6"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    !!! tip "Подсказка"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 04:21:06 GMT 2024
    - 19.6K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    例如,您可以使用这种方式创建一个数据库会话,并在完成后关闭它。
    
    在发送响应之前,只会执行 `yield` 语句及之前的代码:
    
    ```Python hl_lines="2-4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    生成的值会注入到*路径操作*和其他依赖项中:
    
    ```Python hl_lines="4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    "yield"语句后面的代码会在发送响应后执行::
    
    ```Python hl_lines="5-6"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    !!! tip "提示"
    
        您可以使用 `async` 或普通函数。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python hl_lines="2-4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    The yielded value is what is injected into *path operations* and other dependencies:
    
    ```Python hl_lines="4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    The code following the `yield` statement is executed after the response has been delivered:
    
    ```Python hl_lines="5-6"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    !!! tip
    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)
  4. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/dependencies/tutorial001_an.py!}
        ```
    
    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="7"
        {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

        {!> ../../../docs_src/dependencies/tutorial008_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="17-18  25-26"
        {!> ../../../docs_src/dependencies/tutorial008_an.py!}
        ```
    
    === "Python 3.8+ nicht annotiert"
    
        !!! tip "Tipp"
            Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
        ```Python hl_lines="16-17  24-25"
        {!> ../../../docs_src/dependencies/tutorial008.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:10:29 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/dependencies/classes-as-dependencies.md

    === "Python 3.10+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/dependencies/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="11"
        {!> ../../../docs_src/dependencies/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/dependencies/tutorial001_an.py!}
        ```
    
    === "Python 3.10+ nicht annotiert"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:01:58 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  7. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    レスポンスを送信する前に`yield`文を含む前のコードのみが実行されます。
    
    ```Python hl_lines="2 3 4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    生成された値は、*path operations*や他の依存関係に注入されるものです:
    
    ```Python hl_lines="4"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    `yield`文に続くコードは、レスポンスが送信された後に実行されます:
    
    ```Python hl_lines="5 6"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    !!! tip "豆知識"
        `async`や通常の関数を使用することができます。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/dependencies/index.md

    You can define dependencies that in turn can define dependencies themselves.
    
    In the end, a hierarchical tree of dependencies is built, and the **Dependency Injection** system takes care of solving all these dependencies for you (and their sub-dependencies) and providing (injecting) the results at each step.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/bigger-applications.md

    Also fügen wir sie in ihr eigenes `dependencies`-Modul (`app/dependencies.py`) ein.
    
    Wir werden nun eine einfache Abhängigkeit verwenden, um einen benutzerdefinierten `X-Token`-Header zu lesen:
    
    === "Python 3.9+"
    
        ```Python hl_lines="3  6-8" title="app/dependencies.py"
        {!> ../../../docs_src/bigger_applications/app_an_py39/dependencies.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:27:59 GMT 2024
    - 21.1K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/bigger-applications.md

    ...👥 🎯.
    
    * 👫 🔜 ™ ⏮️ 📇 🔖 👈 🔌 👁 🎻 `"items"`.
        * 👫 "🔖" ✴️ ⚠ 🏧 🎓 🧾 ⚙️ (⚙️ 🗄).
    * 🌐 👫 🔜 🔌 🔁 `responses`.
    * 🌐 👫 *➡ 🛠️* 🔜 ✔️ 📇 `dependencies` 🔬/🛠️ ⏭ 👫.
        * 🚥 👆 📣 🔗 🎯 *➡ 🛠️*, **👫 🔜 🛠️ 💁‍♂️**.
        * 📻 🔗 🛠️ 🥇, ⤴️ [`dependencies` 👨‍🎨](dependencies/dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, & ⤴️ 😐 🔢 🔗.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.6K bytes
    - Viewed (0)
Back to top