Last active
August 16, 2020 20:22
-
-
Save anilkay/6e6ac52341d8d79c83aaf2b02cbd0358 to your computer and use it in GitHub Desktop.
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
from psycopg2.extras import NamedTupleCursor | |
import psycopg2 | |
conn = psycopg2.connect() | |
cur = conn.cursor(cursor_factory=NamedTupleCursor) | |
cur.execute("Fancy SQL Quary") | |
data=cur.fetchall() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment