mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-01 00:17:55 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			496 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			496 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """Containers module."""
 | |
| 
 | |
| from dependency_injector import containers, providers
 | |
| from github import Github
 | |
| 
 | |
| from . import services
 | |
| 
 | |
| 
 | |
| class Container(containers.DeclarativeContainer):
 | |
| 
 | |
|     config = providers.Configuration()
 | |
| 
 | |
|     github_client = providers.Factory(
 | |
|         Github,
 | |
|         login_or_token=config.github.auth_token,
 | |
|         timeout=config.github.request_timeout,
 | |
|     )
 | |
| 
 | |
|     search_service = providers.Factory(
 | |
|         services.SearchService,
 | |
|         github_client=github_client,
 | |
|     )
 |