Last active
December 12, 2019 18:23
-
-
Save paydro/a37408aa0313456e08fd688fd921c87f to your computer and use it in GitHub Desktop.
Connect to my local postgres database in python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2 | |
conn = psycopg2.connect("") | |
cur = conn.cursor() | |
# now you can run queries | |
# cur.execute("SELECT 1") | |
# See http://initd.org/psycopg/docs/usage.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment