We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b49944c commit ea0e586Copy full SHA for ea0e586
app/api/deps.py
@@ -0,0 +1,7 @@
1
+from app.db.session import get_async_session
2
+from typing import AsyncGenerator
3
+from sqlalchemy.ext.asyncio import AsyncSession
4
+
5
+async def get_session() -> AsyncGenerator[AsyncSession, None]:
6
+ async for s in get_async_session():
7
+ yield s
0 commit comments