from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from app.config.config_reader import database_url


db_engine = create_engine(database_url, echo=True, echo_pool=True)

db_session = sessionmaker(bind=db_engine, autoflush=False, autocommit=False, expire_on_commit=True)
session = scoped_session(db_session)