Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 461 for dependency_c (0.11 sec)

  1. docs_src/dependencies/tutorial008_an_py39.py

    from fastapi import Depends
    
    
    async def dependency_a():
        dep_a = generate_dep_a()
        try:
            yield dep_a
        finally:
            dep_a.close()
    
    
    async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]):
        dep_b = generate_dep_b()
        try:
            yield dep_b
        finally:
            dep_b.close(dep_a)
    
    
    async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
        dep_c = generate_dep_c()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 521 bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    **FastAPI** 🔜 ⚒ 💭 👈 "🚪 📟" 🔠 🔗 ⏮️ `yield` 🏃 ☑ ✔.
    
    🖼, `dependency_c` 💪 ✔️ 🔗 🔛 `dependency_b`, & `dependency_b` 🔛 `dependency_a`:
    
    ```Python hl_lines="4  12  20"
    {!../../docs_src/dependencies/tutorial008.py!}
    ```
    
    & 🌐 👫 💪 ⚙️ `yield`.
    
    👉 💼 `dependency_c`, 🛠️ 🚮 🚪 📟, 💪 💲 ⚪️➡️ `dependency_b` (📥 📛 `dep_b`) 💪.
    
    & , 🔄, `dependency_b` 💪 💲 ⚪️➡️ `dependency_a` (📥 📛 `dep_a`) 💪 🚮 🚪 📟.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008.py

    from fastapi import Depends
    
    
    async def dependency_a():
        dep_a = generate_dep_a()
        try:
            yield dep_a
        finally:
            dep_a.close()
    
    
    async def dependency_b(dep_a=Depends(dependency_a)):
        dep_b = generate_dep_b()
        try:
            yield dep_b
        finally:
            dep_b.close(dep_a)
    
    
    async def dependency_c(dep_b=Depends(dependency_b)):
        dep_c = generate_dep_c()
        try:
            yield dep_c
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 455 bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial009.py

    from fastapi import Depends
    
    
    async def dependency_a():
        dep_a = generate_dep_a()
        try:
            yield dep_a
        finally:
            dep_a.close()
    
    
    async def dependency_b(dep_a=Depends(dependency_a)):
        dep_b = generate_dep_b()
        try:
            yield dep_b
        finally:
            dep_b.close(dep_a)
    
    
    async def dependency_c(dep_b=Depends(dependency_b)):
        dep_c = generate_dep_c()
        try:
            yield dep_c
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 455 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial008_an.py

    from typing_extensions import Annotated
    
    
    async def dependency_a():
        dep_a = generate_dep_a()
        try:
            yield dep_a
        finally:
            dep_a.close()
    
    
    async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]):
        dep_b = generate_dep_b()
        try:
            yield dep_b
        finally:
            dep_b.close(dep_a)
    
    
    async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 531 bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    {!../../docs_src/dependencies/tutorial007.py!}
    ```
    ## 使用 `yield` 的子依赖项
    
    你可以声明任意数量和层级的树状依赖,而且它们中的任何一个或所有的都可以使用 `yield`。
    
    **FastAPI** 会确保每个带有 `yield` 的依赖中的"退出代码"按正确顺序运行。
    
    例如,`dependency_c` 可以依赖于 `dependency_b`,而 `dependency_b` 则依赖于 `dependency_a`。
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="6  14  22"
    {!> ../../docs_src/dependencies/tutorial008_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    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

    **FastAPI** は、`yield`を持つ各依存関係の「終了コード」が正しい順番で実行されていることを確認します。
    
    例えば、`dependency_c`は`dependency_b`と`dependency_b`に依存する`dependency_a`に、依存することができます:
    
    ```Python hl_lines="4 12 20"
    {!../../docs_src/dependencies/tutorial008.py!}
    ```
    
    そして、それらはすべて`yield`を使用することができます。
    
    この場合、`dependency_c`は終了コードを実行するために、`dependency_b`(ここでは`dep_b`という名前)の値がまだ利用可能である必要があります。
    
    そして、`dependency_b`は`dependency_a`(ここでは`dep_a`という名前)の値を終了コードで利用できるようにする必要があります。
    
    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/dependencies-with-yield.md

    **FastAPI** будет следить за тем, чтобы "код по выходу" в каждой зависимости с `yield` выполнялся в правильном порядке.
    
    Например, `dependency_c` может иметь зависимость от `dependency_b`, а `dependency_b` от `dependency_a`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="6  14  22"
    {!> ../../docs_src/dependencies/tutorial008_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.6+
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    **FastAPI** stellt sicher, dass der „Exit-Code“ in jeder Abhängigkeit mit `yield` in der richtigen Reihenfolge ausgeführt wird.
    
    Beispielsweise kann `dependency_c` von `dependency_b` und `dependency_b` von `dependency_a` abhängen:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="6  14  22"
    {!> ../../docs_src/dependencies/tutorial008_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    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/en/docs/tutorial/dependencies/dependencies-with-yield.md

    For example, `dependency_c` can have a dependency on `dependency_b`, and `dependency_b` on `dependency_a`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="6  14  22"
    {!> ../../docs_src/dependencies/tutorial008_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="5  13  21"
    {!> ../../docs_src/dependencies/tutorial008_an.py!}
    ```
    
    ////
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14K bytes
    - Viewed (0)
Back to top