|
|
|
@ -21,7 +21,7 @@ import getpass
|
|
|
|
|
|
|
|
|
|
def insert_Status(type, adresse, valeur):
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
db_host = input('Nom d\'hôte : ')
|
|
|
|
|
if not db_host:
|
|
|
|
|
db_host = 'londres'
|
|
|
|
@ -35,9 +35,6 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
connection = psy.connect(host=db_host, database=db_name, user=db_user, password=db_password)
|
|
|
|
|
cur = connection.cursor()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for row in df.itertuples():
|
|
|
|
|
cur.execute("INSERT INTO Status VALUES (%s,%s,%s );",
|
|
|
|
|
(type,
|
|
|
|
@ -83,3 +80,6 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
create_tables(connection, 'Table.sql')
|
|
|
|
|
connection.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insert_Status(c,1,1)
|
|
|
|
|