17 lines
489 B
Python
17 lines
489 B
Python
from urllib.parse import quote_plus
|
|
|
|
from sqlalchemy import create_engine
|
|
from sqlalchemy.orm import sessionmaker, declarative_base
|
|
import os
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
# URL-encode the password
|
|
password = quote_plus("33Pippin!!;")
|
|
DATABASE_URL = f"postgresql+psycopg2://admin:{password}@voo8ccgwss0ks0000occko4s:5432/postgres"
|
|
|
|
|
|
engine = create_engine(DATABASE_URL)
|
|
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
Base = declarative_base()
|