- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 166 for yielded (0.08 sec)
-
tests/test_router_events.py
async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]: yield @asynccontextmanager async def router_lifespan(app: FastAPI) -> AsyncGenerator[Dict[str, bool], None]: yield {"router": True} @asynccontextmanager async def sub_router_lifespan(app: FastAPI) -> AsyncGenerator[None, None]: yield sub_router = APIRouter(lifespan=sub_router_lifespan)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:09:52 UTC 2024 - 7.3K bytes - Viewed (0) -
docs_src/dependencies/tutorial008.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:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 455 bytes - Viewed (0) -
docs_src/dependencies/tutorial009.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:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 455 bytes - Viewed (0) -
docs_src/dependencies/tutorial008_an.py
from typing_extensions import Annotated async def dependency_a(): dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 531 bytes - Viewed (0) -
docs/pt/docs/advanced/events.md
A primeira coisa a notar, é que estamos definindo uma função assíncrona com `yield`. Isso é muito semelhante à Dependências com `yield`. ```Python hl_lines="14-19" {!../../docs_src/events/tutorial003.py!} ``` A primeira parte da função, antes do `yield`, será executada **antes** da aplicação inicializar. E a parte posterior do `yield` irá executar **após** a aplicação ser encerrada. ### Gerenciador de Contexto Assíncrono
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
{* ../../docs_src/events/tutorial003.py hl[14:19] *} The first part of the function, before the `yield`, will be executed **before** the application starts. And the part after the `yield` will be executed **after** the application has finished. ### Async Context Manager If you check, the function is decorated with an `@asynccontextmanager`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:36:22 UTC 2024 - 7.6K bytes - Viewed (0) -
docs/de/docs/advanced/events.md
### Lifespan-Funktion Das Erste, was auffällt, ist, dass wir eine asynchrone Funktion mit `yield` definieren. Das ist sehr ähnlich zu Abhängigkeiten mit `yield`. ```Python hl_lines="14-19" {!../../docs_src/events/tutorial003.py!} ``` 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. ### Asynchroner Kontextmanager
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.1K bytes - Viewed (0) -
tests/test_dependency_class.py
class CallableGenDependency: def __call__(self, value: str) -> Generator[str, None, None]: yield value class AsyncCallableDependency: async def __call__(self, value: str) -> str: return value class AsyncCallableGenDependency: async def __call__(self, value: str) -> AsyncGenerator[str, None]: yield value class MethodsDependency: def synchronous(self, value: str) -> str:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 10:54:05 UTC 2020 - 3.3K bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
pass async def asyncgen_state(state: Dict[str, str] = Depends(get_state)): state["/async"] = "asyncgen started" yield state["/async"] state["/async"] = "asyncgen completed" def generator_state(state: Dict[str, str] = Depends(get_state)): state["/sync"] = "generator started" yield state["/sync"] state["/sync"] = "generator completed"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 11.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/CrawlingConfigHelper.java
yield webConfigService.getWebConfig(id).get(); } case FILE -> { final FileConfigService fileConfigService = ComponentUtil.getComponent(FileConfigService.class); yield fileConfigService.getFileConfig(id).get(); } case DATA -> {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 11.7K bytes - Viewed (0)