Automated Action 1fca93299a Complete Todo App implementation
- Added filtering and pagination for todo listings
- Fixed Alembic migration setup
- Enhanced CRUD operations
- Updated documentation with comprehensive README
- Linted code with Ruff
2025-06-17 02:13:03 +00:00

14 lines
422 B
Python

from pathlib import Path
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
DB_DIR = Path("/app") / "storage" / "db"
DB_DIR.mkdir(parents=True, exist_ok=True)
SQLALCHEMY_DATABASE_URL = f"sqlite:///{DB_DIR}/db.sqlite"
engine = create_engine(
SQLALCHEMY_DATABASE_URL,
connect_args={"check_same_thread": False}
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)