Repository pattern example for Postgres-py