Using the Repository Pattern for better data access encapsulation (in Python)