>>> import psycopg2 >>> c = psycopg2.connect("host='localhost' dbname='mydb' user='myuser' password='secret' sslmode='disable' gssencmode='disable'")