first commit

This commit is contained in:
2024-07-15 17:55:45 -04:00
commit 853529b871
23 changed files with 454 additions and 0 deletions

21
database.py Normal file
View File

@@ -0,0 +1,21 @@
from sqlalchemy import create_engine
from sqlalchemy.engine import URL
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import declarative_base
url = URL.create(
drivername="postgresql",
username="postgres",
password="password",
host="192.168.1.204",
database="eamco",
port=5432
)
engine = create_engine(url)
Session = sessionmaker(autocommit=False, autoflush=False, bind=engine)
session = Session()
Base = declarative_base()
Base.metadata.create_all(engine)