INNER CODE UNIT · Python

Base

hunvreus/devpush · app/db.py:25

class Base(DeclarativeBase):
    pass


async def get_db():
    async with AsyncSessionLocal() as session:
        try:
            yield session
            await session.commit()
        except Exception:
            await session.rollback()
            raise
        finally:
            await session.close()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…