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