python-dependency-injector/examples/miniapps/decoupled-packages/example/photo/repositories.py
Roman Mogylatov 29f209d382
Update bundles example (#292)
* Fix dependency provider stub issue with required init arg

* Refactor bundles example app

* Rename bundles package

* Rename bundles example container

* Rename bundles mini app to decoupled packages

* Move decoupled packages example to main examples

* Fix a typo

* Add meta
2020-09-06 21:51:38 -04:00

13 lines
295 B
Python

"""Photo repositories module."""
class PhotoRepository:
def __init__(self, entity_factory, fs, db):
self.entity_factory = entity_factory
self.fs = fs
self.db = db
def get_photos(self, user_id):
return [self.entity_factory() for _ in range(user_id*5)]