psycopg2を使うと便利なようです。
以下は、最低限必要になりそうなサンプル。
import psycopg2
con = psycopg2.connect(
    database = "database"
    , user = "username"
    , password = "password"
    , host = "host"
    , port = 5432
    )
cur = con.cursor()
cur.execute("select * from tablename")
cur.fetchall()