The postgres-helper library is build on top of psycopg2. It will be really helpful for running the basic postgresql query in python.
postgres-helper