Category : sqlacodegen

Currently I am trying to setup sqlalchemy orm with sql server express The code below works with no issues and outputs correctly: from sqlalchemy import create_engine from sqlalchemy.orm import session, sessionmaker import urllib from dotenv import load_dotenv import os load_dotenv() db_pass = os.getenv(‘DATABASE_PASS’) engine = create_engine(f’mssql+pyodbc://grimm:{db_pass}@localhostSQLEXPRESS/GrimmDB?driver=ODBC+Driver+17+for+SQL+Server’) Session = sessionmaker(bind=engine) session = Session with engine.connect() as ..

Read more