import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from config import load_config

Base = declarative_base()

config = load_config()
engine = sa.create_engine(config['DATABASE_URL'])
Session = sessionmaker(bind=engine)

def setup_database():
    Base.metadata.create_all(engine)
