- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 583 for DEPENDENCIES (0.06 sec)
-
docs/en/docs/advanced/advanced-dependencies.md
# Advanced Dependencies ## Parameterized dependencies All the dependencies we have seen are a fixed function or class. But there could be cases where you want to be able to set parameters on the dependency, without having to declare many different functions or classes. Let's imagine that we want to have a dependency that checks if the query parameter `q` contains some fixed content. But we want to be able to parameterize that fixed content.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:10:15 UTC 2024 - 2.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/global-dependencies.md
# 全局依赖项 有时,我们要为整个应用添加依赖项。 通过与定义[*路径装饰器依赖项*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank} 类似的方式,可以把依赖项添加至整个 `FastAPI` 应用。 这样一来,就可以为所有*路径操作*应用该依赖项: ```Python hl_lines="15" {!../../docs_src/dependencies/tutorial012.py!} ``` [*路径装饰器依赖项*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank} 一章的思路均适用于全局依赖项, 在本例中,这些依赖项可以用于应用中的所有*路径操作*。 ## 为一组路径操作定义依赖项
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 955 bytes - Viewed (0) -
docs/em/docs/advanced/advanced-dependencies.md
👈, 👥 📣 👩🔬 `__call__`: ```Python hl_lines="10" {!../../docs_src/dependencies/tutorial011.py!} ``` 👉 💼, 👉 `__call__` ⚫️❔ **FastAPI** 🔜 ⚙️ ✅ 🌖 🔢 & 🎧-🔗, & 👉 ⚫️❔ 🔜 🤙 🚶♀️ 💲 🔢 👆 *➡ 🛠️ 🔢* ⏪. ## 🔗 👐 & 🔜, 👥 💪 ⚙️ `__init__` 📣 🔢 👐 👈 👥 💪 ⚙️ "🔗" 🔗: ```Python hl_lines="7" {!../../docs_src/dependencies/tutorial011.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2K bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
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) -
docs/pt/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+ non-Annotated
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.6K bytes - Viewed (0) -
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) -
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) -
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) -
docs/em/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 - 8.6K bytes - Viewed (0)