- Sort Score
- Result 10 results
- Languages All
Results 221 - 230 of 386 for dependsOn (0.11 sec)
-
docs/zh/docs/tutorial/security/get-current-user.md
{!../../docs_src/security/tutorial002.py!} ``` ## 注入当前用户 在*路径操作* 的 `Depends` 中使用 `get_current_user`: ```Python hl_lines="31" {!../../docs_src/security/tutorial002.py!} ``` 注意,此处把 `current_user` 的类型声明为 Pydantic 的 `User` 模型。 这有助于在函数内部使用代码补全和类型检查。 /// tip | "提示" 还记得请求体也是使用 Pydantic 模型声明的吧。 放心,因为使用了 `Depends`,**FastAPI** 不会搞混。 /// /// check | "检查"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0) -
docs/zh/docs/advanced/advanced-dependencies.md
## 创建实例 使用以下代码创建类实例: ```Python hl_lines="16" {!../../docs_src/dependencies/tutorial011.py!} ``` 这样就可以**参数化**依赖项,它包含 `checker.fixed_content` 的属性 - `"bar"`。 ## 把实例作为依赖项 然后,不要再在 `Depends(checker)` 中使用 `Depends(FixedContentQueryChecker)`, 而是要使用 `checker`,因为依赖项是类实例 - `checker`,不是类。 处理依赖项时,**FastAPI** 以如下方式调用 `checker`: ```Python checker(q="somequery") ``` ……并用*路径操作函数*的参数 `fixed_content_included` 返回依赖项的值:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2K bytes - Viewed (0) -
.github/workflows/mint/minio-pools.yaml
nginx: image: nginx:1.19.2-alpine hostname: nginx volumes: - ./nginx-8-node.conf:/etc/nginx/nginx.conf:ro ports: - "9000:9000" - "9001:9001" depends_on: - minio1 - minio2 - minio3 - minio4 - minio5 - minio6 - minio7 - minio8 ## By default this config uses default local driver,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Nov 03 21:18:18 UTC 2023 - 2.3K bytes - Viewed (0) -
docs/de/docs/advanced/advanced-dependencies.md
## Die Instanz als Abhängigkeit verwenden Dann könnten wir diesen `checker` in einem `Depends(checker)` anstelle von `Depends(FixedContentQueryChecker)` verwenden, da die Abhängigkeit die Instanz `checker` und nicht die Klasse selbst ist. Und beim Auflösen der Abhängigkeit ruft **FastAPI** diesen `checker` wie folgt auf: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
もしくは、依存関係が値を返さない場合もあります。 しかし、それでも実行・解決する必要があります。 このような場合、*path operation関数*のパラメータを`Depends`で宣言する代わりに、*path operation decorator*に`dependencies`の`list`を追加することができます。 ## *path operationデコレータ*への`dependencies`の追加 *path operationデコレータ*はオプショナルの引数`dependencies`を受け取ります。 それは`Depends()`の`list`であるべきです: ```Python hl_lines="17" {!../../docs_src/dependencies/tutorial006.py!} ```
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/em/docs/advanced/websockets.md
<img src="/img/tutorial/websockets/image03.png"> 👆 💪 📨 (& 📨) 📚 📧: <img src="/img/tutorial/websockets/image04.png"> & 🌐 👫 🔜 ⚙️ 🎏 *️⃣ 🔗. ## ⚙️ `Depends` & 🎏 *️⃣ 🔗 👆 💪 🗄 ⚪️➡️ `fastapi` & ⚙️: * `Depends` * `Security` * `Cookie` * `Header` * `Path` * `Query` 👫 👷 🎏 🌌 🎏 FastAPI 🔗/*➡ 🛠️*: ```Python hl_lines="66-77 76-91"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.8K bytes - Viewed (0) -
docs/orchestration/docker-compose/docker-compose.yaml
- data4-2:/data2 nginx: image: nginx:1.19.2-alpine hostname: nginx volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: - "9000:9000" - "9001:9001" depends_on: - minio1 - minio2 - minio3 - minio4 ## By default this config uses default local driver, ## For custom volumes replace with volume driver configuration. volumes: data1-1:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 30 21:24:58 UTC 2024 - 1.5K bytes - Viewed (0) -
.github/workflows/mint/minio-compress-encrypt.yaml
nginx: image: nginx:1.19.2-alpine hostname: nginx volumes: - ./nginx-4-node.conf:/etc/nginx/nginx.conf:ro ports: - "9000:9000" - "9001:9001" depends_on: - minio1 - minio2 - minio3 - minio4 ## By default this config uses default local driver, ## For custom volumes replace with volume driver configuration. volumes: cdata1-1:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Nov 03 21:18:18 UTC 2023 - 1.7K bytes - Viewed (0) -
.github/workflows/mint/minio-resiliency.yaml
nginx: image: nginx:1.19.2-alpine hostname: nginx volumes: - ./nginx-4-node.conf:/etc/nginx/nginx.conf:ro ports: - "9000:9000" - "9001:9001" depends_on: - minio1 - minio2 - minio3 - minio4 ## By default this config uses default local driver, ## For custom volumes replace with volume driver configuration. volumes: rdata1-1:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 1.7K bytes - Viewed (0) -
.github/workflows/multipart/docker-compose-site1.yaml
- site1-data4-2:/data2 site1-nginx: image: nginx:1.19.2-alpine hostname: site1-nginx volumes: - ./nginx-site1.conf:/etc/nginx/nginx.conf:ro ports: - "9001:9001" depends_on: - site1-minio1 - site1-minio2 - site1-minio3 - site1-minio4 ## By default this config uses default local driver, ## For custom volumes replace with volume driver configuration. volumes:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Sep 30 10:13:56 UTC 2023 - 1.5K bytes - Viewed (0)