Skip to content

Instantly share code, notes, and snippets.

View thibaultserti's full-sized avatar
🎯
Focusing

Thibault Ayanides thibaultserti

🎯
Focusing
View GitHub Profile
def connect_to_postgres(host, port, dbname, user, password):
try:
conn = psycopg2.connect(
host=host,
port=port,
dbname=dbname,
user=user,
password=password
)
print("✅ Connexion réussie à PostgreSQL")