Skip to content

Instantly share code, notes, and snippets.

@Greyvend
Greyvend / repository_pattern.py
Created February 7, 2021 15:59
Repository pattern implementation in Python
"""
This is Python implementation of Repository pattern for accessing Data model
in an Object Oriented manner, simulating collection interface and abstracting
persistence operations.
The Repository also has Factory method for dealing with different Databases. Another
approach is to add direct engine string ingestion to the Repository __init__ method.
"""
from abc import ABC