import os
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

# Umgebungsvariablen
DB_USER = os.getenv("DB_USER", "infoscreen_admin") 
DB_PASSWORD = os.getenv("DB_PASSWORD", "KqtpM7wmNd&mFKs")
DB_HOST = os.getenv("DB_HOST", "db")
DB_NAME = os.getenv("DB_NAME", "infoscreen_by_taa")

DB_URL = f"mysql+pymysql://{DB_USER}:{DB_PASSWORD}@{DB_HOST}/{DB_NAME}"
engine = create_engine(DB_URL, echo=False)
Session = sessionmaker(bind=engine)