- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 577 for DEPENDENCIES (0.06 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
In the same way, you can use `finally` to make sure the exit steps are executed, no matter if there was an exception or not. {* ../../docs_src/dependencies/tutorial007_py310.py hl[3,5] *} ## Sub-dependencies with `yield` { #sub-dependencies-with-yield } You can have sub-dependencies and "trees" of sub-dependencies of any size and shape, and any or all of them can use `yield`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 12.6K bytes - Click Count (0) -
docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md
응답을 생성하기 전에는 `yield`문을 포함하여 그 이전의 코드만이 실행됩니다: {* ../../docs_src/dependencies/tutorial007_py310.py hl[2:4] *} yield된 값은 *경로 처리* 및 다른 의존성들에 주입되는 값 입니다: {* ../../docs_src/dependencies/tutorial007_py310.py hl[4] *} `yield`문 다음의 코드는 응답을 생성한 후 실행됩니다: {* ../../docs_src/dependencies/tutorial007_py310.py hl[5:6] *} /// tip `async` 함수와 일반 함수 모두 사용할 수 있습니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 14.3K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/dependencies/dependencies-with-yield.md
例如,你可以用它建立一個資料庫 session,並在完成後關閉。 只有 `yield` 之前(含 `yield` 本身)的程式碼會在產生回應之前執行: {* ../../docs_src/dependencies/tutorial007_py310.py hl[2:4] *} 由 `yield` 產生的值會被注入到路徑操作(path operation)與其他相依中: {* ../../docs_src/dependencies/tutorial007_py310.py hl[4] *} 位於 `yield` 之後的程式碼會在回應之後執行: {* ../../docs_src/dependencies/tutorial007_py310.py hl[5:6] *} /// tip 你可以使用 `async` 或一般函式。 **FastAPI** 都會正確處理,和一般相依相同。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 11.9K bytes - Click Count (0) -
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) -
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/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)