SorboBot / sorbobotapp /connection.py
leo-bourrel's picture
!feat: Import new sorbobot version
68a9b68
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