SorboBot / connection.py
leo-bourrel's picture
clean: isort
1c516fb
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