from sqlalchery import create_engine
engine = create_enging('postgresql://username:password@IP:port/database_name',echo=True)
db_conn = engine.connect()
sql = '''
DROP table if exists test_tabel;
create table test_table(colum1,colum2,colum3)...
'''
db_conn.execute(sql)
网友评论