Files
location_service/app/db/session.py
exolonConfidental a77788fc47 endpoint setup
2026-02-08 11:18:47 +05:30

14 lines
313 B
Python

from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
from app.db.database import engine
AsyncSessionLocal = async_sessionmaker(
bind=engine,
expire_on_commit=False,
autoflush=False
)
async def get_async_session():
async with AsyncSessionLocal() as session:
yield session