mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 09:57:37 +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):
 | 
					class Photo(object):
 | 
				
			||||||
    pass
 | 
					    """Photo entity."""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,11 @@
 | 
				
			||||||
 | 
					"""Photos bundle entity repositories module."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PhotoRepository(object):
 | 
					class PhotoRepository(object):
 | 
				
			||||||
 | 
					    """Photo entity repository."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, object_factory, fs, db):
 | 
					    def __init__(self, object_factory, fs, db):
 | 
				
			||||||
 | 
					        """Initializer."""
 | 
				
			||||||
        self.object_factory = object_factory
 | 
					        self.object_factory = object_factory
 | 
				
			||||||
        self.fs = fs
 | 
					        self.fs = fs
 | 
				
			||||||
        self.db = db
 | 
					        self.db = db
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
 | 
					"""Users bundle entities module."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class User(object):
 | 
					class User(object):
 | 
				
			||||||
 | 
					    """User entity."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, id):
 | 
					    def __init__(self, id):
 | 
				
			||||||
 | 
					        """Initializer."""
 | 
				
			||||||
        self.id = id
 | 
					        self.id = id
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,14 @@
 | 
				
			||||||
 | 
					"""Users bundle entity repositories module."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UserRepository(object):
 | 
					class UserRepository(object):
 | 
				
			||||||
 | 
					    """User entity repository."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, object_factory, db):
 | 
					    def __init__(self, object_factory, db):
 | 
				
			||||||
 | 
					        """Initializer."""
 | 
				
			||||||
        self.object_factory = object_factory
 | 
					        self.object_factory = object_factory
 | 
				
			||||||
        self.db = db
 | 
					        self.db = db
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get(self, id):
 | 
					    def get(self, id):
 | 
				
			||||||
 | 
					        """Return user entity with given identifier."""
 | 
				
			||||||
        return self.object_factory(id=id)
 | 
					        return self.object_factory(id=id)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user