Breadcrumbs fastapi-lifespan-manager / pyproject.tomlTop File metadata and controls Code Blame 135 lines (124 loc) · 2.66 KB Raw [tool.poetry] name = "fastapi-lifespan-manager" version = "0.1.5" description = "FastAPI Lifespan Manager" authors = ["Yurii Karabas <1998uriyyo@gmail.com...
fastapi-lifespan-manageris a Python library that provides a lifespan manager for FastAPI applications. TheLifespanManagerinfastapi-lifespan-managerallows you to have multiple lifespan in one application. This library is particularly useful for managing background tasks, such as starting and stopping ...
@asynccontextmanager async def lifespan(_app: FastAPI): async with httpx.AsyncClient(base_url=env.proxy_url, transport=httpx.MockTransport(dummy_response)) as client: yield {'client': client} await client.aclose() 我正在尝试测试一个名为 proxy 的端点,它工作正常,但我需要进行回归测试: impo...
Breadcrumbs fastapi-lifespan-manager / .gitignoreTop File metadata and controls Code Blame 139 lines (112 loc) · 1.82 KB Raw # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist...
fastapi-lifespan-manageris a Python library that provides a lifespan manager for FastAPI applications. TheLifespanManagerinfastapi-lifespan-managerallows you to have multiple lifespan in one application. This library is particularly useful for managing background tasks, such as starting and stopping ...
ext.asyncio import create_async_engine from fastapi_lifespan_manager import LifespanManager, State manager = LifespanManager() @manager.add async def setup_db(app: FastAPI) -> AsyncIterator[State]: engine = await create_async_engine("postgresql+asyncpg://user:password@localhost/db") yield {"...
FastAPI LifespanManager 🧑⚖️. Contribute to uriyyo/fastapi-lifespan-manager development by creating an account on GitHub.
FastAPI LifespanManager 🧑⚖️. Contribute to uriyyo/fastapi-lifespan-manager development by creating an account on GitHub.
uriyyo / fastapi-lifespan-manager Public Notifications Fork 1 Star 23 Code Issues Pull requests Discussions Actions Projects Security Insights uriyyo/fastapi-lifespan-manager projects Search all projects Search results No open projects ...
fastapi-lifespan-manageris a Python library that provides a lifespan manager for FastAPI applications. TheLifespanManagerinfastapi-lifespan-managerallows you to have multiple lifespan in one application. This library is particularly useful for managing background tasks, such as starting and stopping ...