- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 549 for Dependencies (0.07 seconds)
-
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
The *path operation decorator* receives an optional argument `dependencies`. It should be a `list` of `Depends()`: {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[19] *} These dependencies will be executed/solved the same way as normal dependencies. But their value (if they return any) won't be passed to your *path operation function*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2.9K bytes - Click Count (0) -
docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
場合によっては、*path operation 関数*の中で依存関係の戻り値を実際には必要としないことがあります。 または、依存関係が値を返さない場合もあります。 しかし、それでも実行・解決される必要があります。 そのような場合、`Depends` で *path operation 関数* のパラメータを宣言する代わりに、*path operation デコレータ*に `dependencies` の `list` を追加できます。 ## *path operation デコレータ*に`dependencies`を追加 { #add-dependencies-to-the-path-operation-decorator } *path operation デコレータ*はオプション引数`dependencies`を受け取ります。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 3.6K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/references/dependencies.md
Use dependencies when: * They can't be declared in Pydantic validation and require additional logic * The logic depends on external resources or could block in any other way * Other dependencies need their results (it's a sub-dependency) * The logic can be shared by multiple endpoints to do things like error early, authentication, etc. * They need to handle cleanup (e.g., DB sessions, file handles), using dependencies with `yield`
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 3.2K bytes - Click Count (0) -
docs/en/docs/reference/dependencies.md
# Dependencies - `Depends()` and `Security()` ## `Depends()` Dependencies are handled mainly with the special function `Depends()` that takes a callable. Here is the reference for it and its parameters. You can import it directly from `fastapi`: ```python from fastapi import Depends ``` ::: fastapi.Depends ## `Security()`
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 671 bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/global-dependencies.md
# Global Dependencies { #global-dependencies } For some types of applications you might want to add dependencies to the whole application. Similar to the way you can [add `dependencies` to the *path operation decorators*](dependencies-in-path-operation-decorators.md), you can add them to the `FastAPI` application. In that case, they will be applied to all the *path operations* in the application: {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 1K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/dependencies/global-dependencies.md
# 全域依賴 { #global-dependencies } 在某些類型的應用程式中,你可能想為整個應用程式新增依賴。 類似於你可以在[路徑操作(path operation)的裝飾器中新增 `dependencies`](dependencies-in-path-operation-decorators.md) 的方式,你也可以把它們加到 `FastAPI` 應用程式上。 在這種情況下,它們會套用到應用程式中的所有路徑操作: {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *} 而且,在[將 `dependencies` 新增到路徑操作裝飾器](dependencies-in-path-operation-decorators.md) 那一節中的所有概念依然適用,只是這裡是套用到整個應用中的所有路徑操作。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 1K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/sub-dependencies.md
# Sub-dependencies { #sub-dependencies } You can create dependencies that have **sub-dependencies**. They can be as **deep** as you need them to be. **FastAPI** will take care of solving them. ## First dependency "dependable" { #first-dependency-dependable } You could create a first dependency ("dependable") like: {* ../../docs_src/dependencies/tutorial005_an_py310.py hl[8:9] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:32:12 GMT 2026 - 3.7K bytes - Click Count (0) -
docs/en/docs/advanced/advanced-dependencies.md
# Advanced Dependencies { #advanced-dependencies } ## Parameterized 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.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 9K bytes - Click Count (0) -
docs/en/docs/advanced/testing-dependencies.md
# Testing Dependencies with Overrides { #testing-dependencies-with-overrides } ## Overriding dependencies during testing { #overriding-dependencies-during-testing } There are some scenarios where you might want to override a dependency during testing. You don't want the original dependency to run (nor any of the sub-dependencies it might have).Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 2.4K bytes - Click Count (0) -
docs/ja/docs/tutorial/dependencies/global-dependencies.md
# グローバルな依存関係 { #global-dependencies } アプリケーションの種類によっては、アプリ全体に依存関係を追加したい場合があります。 [`dependencies` を path operation のデコレータに追加](dependencies-in-path-operation-decorators.md)できるのと同様に、`FastAPI` アプリケーション自体にも追加できます。 その場合、アプリケーション内のすべての path operation に適用されます: {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 1.2K bytes - Click Count (0)