File size: 310 Bytes
3379bad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import psycopg2

conn = psycopg2.connect(
    database = "testdb", 
    user = "postgres", 
    host= 'localhost',
    password = "js205112*",
    port = 5432
)
cur = conn.cursor()
cur.execute('select * from api_configurations')

rows = cur.fetchall()
conn.commit()
conn.close()
for row in rows:
    print(row)