Package skeleton, pyproject/alembic config, env-driven settings (app/config.py), and the SQLAlchemy models + initial Alembic migration covering users, UTXO events, rounds/participants, round config, pending transactions, withdrawals and the audit log. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
12 lines
315 B
Python
12 lines
315 B
Python
from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
|
|
from sqlalchemy.orm import DeclarativeBase
|
|
|
|
from app.config import settings
|
|
|
|
engine = create_async_engine(settings.database_url)
|
|
AsyncSessionLocal = async_sessionmaker(engine, expire_on_commit=False)
|
|
|
|
|
|
class Base(DeclarativeBase):
|
|
pass
|