16 lines
393 B
Python
16 lines
393 B
Python
import psycopg2
|
|
from psycopg2.extras import DictCursor
|
|
|
|
conn = psycopg2.connect(
|
|
dbname='adcfi',
|
|
user='postgres',
|
|
password='Ultr4p0d3r0s0##',
|
|
host='200.13.89.42',
|
|
port='5432'
|
|
)
|
|
|
|
with conn.cursor(cursor_factory=DictCursor) as cur:
|
|
cur.execute("SELECT * FROM calificaciones.calificaciones_log ORDER BY log_timestamp DESC LIMIT 10")
|
|
|
|
for row in cur:
|
|
print(row) |