- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 247 for levent (0.28 sec)
-
docs/de/docs/advanced/events.md
Diese Funktionen können mit `async def` oder normalem `def` deklariert werden. ### `startup`-Event { #startup-event } Um eine Funktion hinzuzufügen, die vor dem Start der Anwendung ausgeführt werden soll, deklarieren Sie diese mit dem Event `startup`: {* ../../docs_src/events/tutorial001_py39.py hl[8] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 9.5K bytes - Viewed (0) -
docs/ru/docs/advanced/events.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.7K bytes - Viewed (0) -
docs/pt/docs/advanced/events.md
Essas funções podem ser declaradas com `async def` ou `def` normal. ### Evento `startup` { #startup-event } Para adicionar uma função que deve rodar antes de a aplicação iniciar, declare-a com o evento `"startup"`: {* ../../docs_src/events/tutorial001_py39.py hl[8] *} Nesse caso, a função de manipulador do evento `startup` inicializará os itens do "banco de dados" (apenas um `dict`) com alguns valores.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 8.8K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
In this case, the `startup` event handler function will initialize the items "database" (just a `dict`) with some values. You can add more than one event handler function. And your application won't start receiving requests until all the `startup` event handlers have completed. ### `shutdown` event { #shutdown-event } To add a function that should be run when the application is shutting down, declare it with the event `"shutdown"`:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.9K bytes - Viewed (0) -
docs/zh/docs/advanced/events.md
首先要注意的是,我们定义了一个带有 `yield` 的异步函数。这与带有 `yield` 的依赖项非常相似。 ```Python hl_lines="14-19" {!../../docs_src/events/tutorial003.py!} ``` 这个函数在 `yield`之前的部分,会在应用启动前执行。 剩下的部分在 `yield` 之后,会在应用完成后执行。 ## 异步上下文管理器 如你所见,这个函数有一个装饰器 `@asynccontextmanager` 。 它将函数转化为所谓的“**异步上下文管理器**”。 ```Python hl_lines="1 13" {!../../docs_src/events/tutorial003.py!} ``` 在 Python 中, **上下文管理器**是一个你可以在 `with` 语句中使用的东西,例如,`open()` 可以作为上下文管理器使用。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 7K bytes - Viewed (0) -
docs/en/docs/advanced/testing-events.md
# Testing Events: lifespan and startup - shutdown { #testing-events-lifespan-and-startup-shutdown } When you need `lifespan` to run in your tests, you can use the `TestClient` with a `with` statement: {* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *} You can read more details about the ["Running lifespan in tests in the official Starlette documentation site."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 626 bytes - Viewed (0) -
docs/es/docs/advanced/events.md
Estas funciones pueden ser declaradas con `async def` o `def` normal. ### Evento `startup` { #startup-event } Para añadir una función que debería ejecutarse antes de que la aplicación inicie, declárala con el evento `"startup"`: {* ../../docs_src/events/tutorial001_py39.py hl[8] *} En este caso, la función manejadora del evento `startup` inicializará los ítems de la "base de datos" (solo un `dict`) con algunos valores.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 8.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/EventRecorder.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 4.5K bytes - Viewed (0) -
docs/ko/docs/advanced/events.md
{* ../../docs_src/events/tutorial003.py hl[14:19] *} 함수의 첫 번째 부분, 즉 `yield` 이전의 코드는 애플리케이션이 시작되기 **전에** 실행됩니다. 그리고 `yield` 이후의 부분은 애플리케이션이 완료된 후 **나중에** 실행됩니다. ### 비동기 컨텍스트 매니저 함수를 확인해보면, `@asynccontextmanager`로 장식되어 있습니다. 이것은 함수를 "**비동기 컨텍스트 매니저**"라고 불리는 것으로 변환시킵니다. {* ../../docs_src/events/tutorial003.py hl[1,13] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 9.2K bytes - Viewed (0) -
tests/test_sub_callbacks.py
) def invoice_notification(body: InvoiceEvent): pass # pragma: nocover class Event(BaseModel): name: str total: float events_callback_router = APIRouter() @events_callback_router.get("{$callback_url}/events/{$request.body.title}") def event_callback(event: Event): pass # pragma: nocover subrouter = APIRouter()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.9K bytes - Viewed (0)