SorboBot / sorbobotapp /connection.py
Léo Bourrel
feat: move to subfolder sorbobotapp
b7f6a3a
raw
history blame
266 Bytes
import sqlalchemy
CONNECTION_STRING = "postgresql+psycopg2://postgres@/sorbobot?host=0.0.0.0"
def connect() -> sqlalchemy.engine.Connection:
engine = sqlalchemy.create_engine(CONNECTION_STRING, pool_pre_ping=True)
conn = engine.connect()
return conn