- Sort Score
- Num 10 results
- Language All
Results 1421 - 1430 of 1,944 for field (0.03 seconds)
-
fastapi/.agents/skills/fastapi/references/dependencies.md
* They need to handle cleanup (e.g., DB sessions, file handles), using dependencies with `yield` * Their logic needs input data from the request, like headers, query parameters, etc. ## Dependencies with `yield` and `scope` When using dependencies with `yield`, they can have a `scope` that defines when the exit code is run.
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/ru/docs/advanced/events.md
### Функция lifespan { #lifespan-function } Первое, на что стоит обратить внимание, — мы определяем асинхронную функцию с `yield`. Это очень похоже на Зависимости с `yield`. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} Первая часть функции, до `yield`, будет выполнена до запуска приложения. А часть после `yield` будет выполнена после завершения работы приложения. ### Асинхронный менеджер контекста { #async-context-manager }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 12.6K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/stream-data.md
/// tip 如果你需要在 async 函式內呼叫阻塞程式碼,或在阻塞函式中呼叫 async 函式,你可以使用 [Asyncer](https://asyncer.tiangolo.com),它是 FastAPI 的姊妹函式庫。 /// ### `yield from` { #yield-from } 當你在迭代某個物件(如類檔案物件),並對每個項目使用 `yield` 時,也可以用 `yield from` 直接逐項產出,省略 `for` 迴圈。 這不是 FastAPI 特有的功能,而是 Python 語法;不過這招很實用。 😎Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:33:04 GMT 2026 - 4.9K bytes - Click Count (0) -
tests/test_dependency_contextvars.py
client = TestClient(app) def test_dependency_contextvars(): """ Check that custom middlewares don't affect the contextvar context for dependencies. The code before yield and the code after yield should be run in the same contextvar context, so that request_state_context_var.reset(contextvar_token). If they are run in a different context, that raises an error. """
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.5K bytes - Click Count (0) -
docs/es/docs/advanced/events.md
Lo primero que hay que notar es que estamos definiendo una función asíncrona con `yield`. Esto es muy similar a las Dependencias con `yield`. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} La primera parte de la función, antes del `yield`, será ejecutada **antes** de que la aplicación comience. Y la parte después del `yield` será ejecutada **después** de que la aplicación haya terminado.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 8.4K bytes - Click Count (0) -
docs_src/dependencies/tutorial008_py310.py
dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a=Depends(dependency_a)): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b=Depends(dependency_b)): dep_c = generate_dep_c() try: yield dep_c finally:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 455 bytes - Click Count (0) -
docs/de/docs/advanced/events.md
Das Erste, was auffällt, ist, dass wir eine asynchrone Funktion mit `yield` definieren. Das ist sehr ähnlich zu Abhängigkeiten mit `yield`. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} Der erste Teil der Funktion, vor dem `yield`, wird ausgeführt **bevor** die Anwendung startet. Und der Teil nach `yield` wird ausgeführt, **nachdem** die Anwendung beendet ist.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 9.4K bytes - Click Count (0) -
docs/zh/docs/advanced/events.md
可能你需要启动一个新版本,或者你只是厌倦了运行它。 🤷 /// ### 生命周期函数 { #lifespan-function } 首先要注意的是,我们定义了一个带有 `yield` 的异步函数。这与带有 `yield` 的依赖项非常相似。 {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} 这个函数在 `yield` 之前的部分,会在应用启动前执行。 剩下的部分在 `yield` 之后,会在应用完成后执行。 ### 异步上下文管理器 { #async-context-manager } 如你所见,这个函数有一个装饰器 `@asynccontextmanager`。 它将函数转化为所谓的“**异步上下文管理器**”。 {* ../../docs_src/events/tutorial003_py310.py hl[1,13] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 7.2K bytes - Click Count (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java
* forked lifecycle. * </p> * <p> * The {@link Parameter} annotation can be added on fields to inject data * from the plugin configuration or from other components. * </p> * <p> * Fields can also be annotated with the {@link Resolution} annotation to be injected * with the dependency collection or resolution result for the project. * </p> *Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Thu Aug 29 18:21:40 GMT 2024 - 3.5K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcLsarOpenPolicy2Test.java
// We verify the effects of the super constructor by checking the fields of the created object. // Assert object_attributes fields assertNotNull(msrpcLsarOpenPolicy2.object_attributes); assertEquals(24, msrpcLsarOpenPolicy2.object_attributes.length); // Assert security_quality_of_service fields assertNotNull(msrpcLsarOpenPolicy2.object_attributes.security_quality_of_service);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 2.1K bytes - Click Count (0)