mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-02-07 07:00:49 +03:00
Add doc blocks for bundles example miniapp
This commit is contained in:
parent
1c6160e827
commit
bb390f51f0
|
@ -1,2 +1,5 @@
|
|||
"""Photos bundle entities module."""
|
||||
|
||||
|
||||
class Photo(object):
|
||||
pass
|
||||
"""Photo entity."""
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
"""Photos bundle entity repositories module."""
|
||||
|
||||
|
||||
class PhotoRepository(object):
|
||||
"""Photo entity repository."""
|
||||
|
||||
def __init__(self, object_factory, fs, db):
|
||||
"""Initializer."""
|
||||
self.object_factory = object_factory
|
||||
self.fs = fs
|
||||
self.db = db
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
"""Users bundle entities module."""
|
||||
|
||||
|
||||
class User(object):
|
||||
"""User entity."""
|
||||
|
||||
def __init__(self, id):
|
||||
"""Initializer."""
|
||||
self.id = id
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
"""Users bundle entity repositories module."""
|
||||
|
||||
|
||||
class UserRepository(object):
|
||||
"""User entity repository."""
|
||||
|
||||
def __init__(self, object_factory, db):
|
||||
"""Initializer."""
|
||||
self.object_factory = object_factory
|
||||
self.db = db
|
||||
|
||||
def get(self, id):
|
||||
"""Return user entity with given identifier."""
|
||||
return self.object_factory(id=id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user