conn = psycopg2.connect(
database = ..,
host = ...,
user = ...,
password = ..,
port = ...
)
cursor = conn.cursor()
with conn.cursor() as cursor, open(os.environ["ddl_path"]) as f: cursor.execute(f.read())
conn.commit()
cursor.close()