mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 18:07:44 +03:00 
			
		
		
		
	Update decoupled-packages example
This commit is contained in:
		
							parent
							
								
									0bd2903e60
								
							
						
					
					
						commit
						1aa2be4491
					
				| 
						 | 
				
			
			@ -1,8 +1,6 @@
 | 
			
		|||
"""Main module."""
 | 
			
		||||
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
from dependency_injector.wiring import inject, Provide
 | 
			
		||||
from dependency_injector.wiring import Provide, inject
 | 
			
		||||
 | 
			
		||||
from .user.repositories import UserRepository
 | 
			
		||||
from .photo.repositories import PhotoRepository
 | 
			
		||||
| 
						 | 
				
			
			@ -38,6 +36,6 @@ def main(
 | 
			
		|||
if __name__ == '__main__':
 | 
			
		||||
    application = ApplicationContainer()
 | 
			
		||||
    application.config.from_ini('config.ini')
 | 
			
		||||
    application.wire(modules=[sys.modules[__name__]])
 | 
			
		||||
    application.wire(modules=[__name__])
 | 
			
		||||
 | 
			
		||||
    main()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@ class ApplicationContainer(containers.DeclarativeContainer):
 | 
			
		|||
 | 
			
		||||
    s3 = providers.Singleton(
 | 
			
		||||
        boto3.client,
 | 
			
		||||
        service_name='s3',
 | 
			
		||||
        service_name="s3",
 | 
			
		||||
        aws_access_key_id=config.aws.access_key_id,
 | 
			
		||||
        aws_secret_access_key=config.aws.secret_access_key,
 | 
			
		||||
    )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user