PostgreSQL data access layer in Python