Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 136 for dependencies (0.1 sec)

  1. docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md

    # Classes como Dependências
    
    Antes de nos aprofundarmos no sistema de **Injeção de Dependência**, vamos melhorar o exemplo anterior.
    
    ## `dict` do exemplo anterior
    
    No exemplo anterior, nós retornávamos um `dict` da nossa dependência ("injetável"):
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="9"
    {!> ../../docs_src/dependencies/tutorial001_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="11"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    ```python hl_lines="16-17  24-25"
    {!> ../../docs_src/dependencies/tutorial008.py!}
    ```
    
    ////
    
    Da mesma forma, você pode ter algumas dependências com `yield` e outras com `return` e ter uma relação de dependência entre algumas dos dois tipos.
    
    E você poderia ter uma única dependência que precisa de diversas outras dependências com `yield`, etc.
    
    Você pode ter qualquer combinação de dependências que você quiser.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="12"
    {!> ../../docs_src/dependencies/tutorial001_an.py!}
    ```
    
    ////
    
    //// tab | Python 3.10+ non-Annotated
    
    /// tip
    
    Prefer to use the `Annotated` version if possible.
    
    ///
    
    ```Python hl_lines="7"
    {!> ../../docs_src/dependencies/tutorial001_py310.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/dependencies/classes-as-dependencies.md

    //// tab | Python 3.10+
    
    ```Python hl_lines="9"
    {!> ../../docs_src/dependencies/tutorial001_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="11"
    {!> ../../docs_src/dependencies/tutorial001_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="12"
    {!> ../../docs_src/dependencies/tutorial001_an.py!}
    ```
    
    ////
    
    //// tab | Python 3.10+ nicht annotiert
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  5. 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
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14K bytes
    - Viewed (0)
  6. 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` 或普通函数。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.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`や通常の関数を使用することができます。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md

    //// tab | Python 3.10+
    
    ```Python hl_lines="9"
    {!> ../../docs_src/dependencies/tutorial001_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="11"
    {!> ../../docs_src/dependencies/tutorial001_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.6+
    
    ```Python hl_lines="12"
    {!> ../../docs_src/dependencies/tutorial001_an.py!}
    ```
    
    ////
    
    //// tab | Python 3.10+ без Annotated
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 16K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python hl_lines="2-4"
    {!../../docs_src/dependencies/tutorial007.py!}
    ```
    
    Der ge`yield`ete Wert ist das, was in *Pfadoperationen* und andere Abhängigkeiten eingefügt wird:
    
    ```Python hl_lines="4"
    {!../../docs_src/dependencies/tutorial007.py!}
    ```
    
    Der auf die `yield`-Anweisung folgende Code wird ausgeführt, nachdem die Response gesendet wurde:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  10. 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 | "Подсказка"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 19.5K bytes
    - Viewed (0)
Back to top