Initial commit - Migrated to Dev environment

This commit is contained in:
2026-02-03 19:55:45 +00:00
commit a34e5b7976
3518 changed files with 481663 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession, async_sessionmaker
from app.core.config import settings
# Create the Async Engine
engine = create_async_engine(settings.DATABASE_URL, echo=False, future=True)
# Create the Session Factory
AsyncSessionLocal = async_sessionmaker(
engine,
class_=AsyncSession,
expire_on_commit=False,
autoflush=False
)
# Dependency for FastAPI Routers
async def get_db():
async with AsyncSessionLocal() as session:
yield session