Files

11 lines
265 B
Python
Raw Permalink Normal View History

2026-09-09 21:55:37 +08:00
from collections.abc import AsyncIterator
from sqlalchemy.ext.asyncio import AsyncSession
from app.infrastructure.db import SessionFactory
async def get_session() -> AsyncIterator[AsyncSession]:
async with SessionFactory() as session:
yield session