Automated Action d2d0b364aa Create Todo application with FastAPI and SQLAlchemy
Generated with and Co-Authored by [BackendIM](https://backend.im)
2025-05-11 19:12:20 +00:00

14 lines
385 B
Python

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from app.core.config import settings
engine = create_engine(
settings.SQLALCHEMY_DATABASE_URL,
connect_args={"check_same_thread": False}
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()