mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-10-31 07:57:43 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			350 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			350 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """The Code."""
 | |
| 
 | |
| 
 | |
| class Service:
 | |
|     """Some "Service"."""
 | |
| 
 | |
| 
 | |
| class Client:
 | |
|     """Some "Client" that uses "Service"."""
 | |
| 
 | |
|     def __init__(self):
 | |
|         """Initialize instance."""
 | |
|         self.service = Service()  # Service instance is created inside Client
 | |
| 
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|     client = Client()  # Application creates Client's instance
 |