Add app/database.py
This commit is contained in:
parent
9a6418a9b6
commit
c73562ae79
1 changed files with 12 additions and 0 deletions
12
app/database.py
Normal file
12
app/database.py
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
from sqlalchemy import create_engine
|
||||||
|
from sqlalchemy.orm import sessionmaker, declarative_base
|
||||||
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
|
DATABASE_URL = "postgres://admin:33Pippin!!;@voo8ccgwss0ks0000occko4s:5432/postgres"
|
||||||
|
|
||||||
|
engine = create_engine(DATABASE_URL)
|
||||||
|
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||||
|
Base = declarative_base()
|
||||||
Loading…
Reference in a new issue