Ashraf Al-Kassem
fix: resolve 149 ruff lint violations for CI pipeline
b1aa633
raw
history blame
455 Bytes
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker, AsyncSession
from app.core.config import settings
engine = create_async_engine(
settings.DATABASE_URL,
echo=False,
future=True,
)
SessionLocal = async_sessionmaker(
autocommit=False,
autoflush=False,
bind=engine,
class_=AsyncSession,
expire_on_commit=False,
)
async def get_db():
async with SessionLocal() as session:
yield session