The python bridge to postgres is the module psycopg2. Also use psycopg2.extras because it allows data to be return as dictionaries. I have seen almost criminally stupid databases designed by Java programers who refused to look at the database that resulted from their bridge to the scary database.