- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 216 for decorators (0.06 seconds)
-
docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
# Зависимости в декораторах операции пути { #dependencies-in-path-operation-decorators } В некоторых случаях, возвращаемое значение зависимости не используется внутри *функции операции пути*. Или же зависимость не возвращает никакого значения. Но вам всё-таки нужно, чтобы она выполнилась. Для таких ситуаций, вместо объявления *функции операции пути* с параметром `Depends`, вы можете добавить список зависимостей `dependencies` в *декоратор операции пути*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 5K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
# 路徑操作裝飾器中的依賴 { #dependencies-in-path-operation-decorators } 有時在你的路徑操作函式中,其實不需要某個依賴的回傳值。 或是該依賴根本沒有回傳值。 但你仍需要它被執行/解析。 這種情況下,你可以不在路徑操作函式的參數上使用 `Depends`,而是在路徑操作裝飾器加入一個 `dependencies` 的 `list`。 ## 在路徑操作裝飾器加入 `dependencies` { #add-dependencies-to-the-path-operation-decorator } 路徑操作裝飾器可接受一個可選參數 `dependencies`。 它應該是由 `Depends()` 組成的 `list`: {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[19] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 2.7K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/global-dependencies.md
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/en/docs/tutorial/path-operation-configuration.md
# Path Operation Configuration { #path-operation-configuration } There are several parameters that you can pass to your *path operation decorator* to configure it. /// warning Notice that these parameters are passed directly to the *path operation decorator*, not to your *path operation function*. /// ## Response Status Code { #response-status-code } You can define the (HTTP) `status_code` to be used in the response of your *path operation*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4K bytes - Click Count (0) -
fastapi/routing.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 193K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
* [`@contextlib.asynccontextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager) would be valid to use as a **FastAPI** dependency. In fact, FastAPI uses those two decorators internally. /// ## A database dependency with `yield` { #a-database-dependency-with-yield } For example, you could use this to create a database session and close it after finishing.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) -
fastapi/applications.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 01 16:16:24 GMT 2026 - 178.6K bytes - Click Count (0) -
docs/en/docs/advanced/additional-responses.md
## Additional Response with `model` { #additional-response-with-model } You can pass to your *path operation decorators* a parameter `responses`. It receives a `dict`: the keys are status codes for each response (like `200`), and the values are other `dict`s with the information for each of them.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.8K bytes - Click Count (0) -
docs/en/docs/advanced/security/oauth2-scopes.md
## `Security` in decorator `dependencies` { #security-in-decorator-dependencies }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 13.4K bytes - Click Count (0) -
docs/en/docs/python-types.md
This might all sound abstract. Don't worry. You'll see all this in action in the [Tutorial - User Guide](tutorial/index.md). The important thing is that by using standard Python types, in a single place (instead of adding more classes, decorators, etc), **FastAPI** will do a lot of the work for you. /// info
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 11K bytes - Click Count (0)