- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for AsyncGenerator (0.08 sec)
-
tests/test_router_events.py
@asynccontextmanager 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
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:09:52 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/test_dependency_class.py
from typing import AsyncGenerator, Generator import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient app = FastAPI() class CallableDependency: def __call__(self, value: str) -> str: return value class CallableGenDependency: def __call__(self, value: str) -> Generator[str, None, None]: yield value class AsyncCallableDependency:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 10:54:05 UTC 2020 - 3.3K bytes - Viewed (0) -
fastapi/concurrency.py
from contextlib import asynccontextmanager as asynccontextmanager from typing import AsyncGenerator, ContextManager, TypeVar import anyio from anyio import CapacityLimiter from starlette.concurrency import iterate_in_threadpool as iterate_in_threadpool # noqa from starlette.concurrency import run_in_threadpool as run_in_threadpool # noqa from starlette.concurrency import ( # noqa run_until_first_complete as run_until_first_complete, )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Dec 25 17:57:35 UTC 2023 - 1.4K bytes - Viewed (0)