mirror of
https://github.com/kevin-DL/fast_api_api_template.git
synced 2026-01-12 10:05:15 +00:00
14 lines
351 B
Python
14 lines
351 B
Python
from sqlalchemy import create_engine
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
from sqlalchemy.orm import sessionmaker
|
|
|
|
from api.config import settings
|
|
|
|
engine = create_engine(
|
|
settings.sqlalchemy_database_url, connect_args={}
|
|
)
|
|
|
|
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
|
|
Base = declarative_base()
|