initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env python
import psycopg2
import psycopg2.extras
conn = psycopg2.connect(
host="localhost",
dbname="postgres",
user="postgres",
password='scripts',
)
c = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
c.execute('''
select * from presidents where termnum = %s
''', (26,))
row = c.fetchone()
print(row['firstname'], row['lastname'])
print('{0[firstname]} {0[lastname]} is a {0[party]}'.format(row))