mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-01 00:17:55 +03:00 
			
		
		
		
	* Add test * Add fix * Add extra test * Remove package imports on discovery for Python versions < 3.6 * Move wiring samples to a different directory
		
			
				
	
	
		
			18 lines
		
	
	
		
			356 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			356 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from dependency_injector import containers, providers
 | |
| 
 | |
| from .service import Service
 | |
| 
 | |
| 
 | |
| class SubContainer(containers.DeclarativeContainer):
 | |
| 
 | |
|     int_object = providers.Object(1)
 | |
| 
 | |
| 
 | |
| class Container(containers.DeclarativeContainer):
 | |
| 
 | |
|     config = providers.Configuration()
 | |
| 
 | |
|     service = providers.Factory(Service)
 | |
| 
 | |
|     sub = providers.Container(SubContainer)
 |