diff --git a/examples/miniapps/boto3-session/boto3_session_example.py b/examples/miniapps/boto3-session/boto3_session_example.py index 33277513..85a3e391 100644 --- a/examples/miniapps/boto3-session/boto3_session_example.py +++ b/examples/miniapps/boto3-session/boto3_session_example.py @@ -23,12 +23,12 @@ class Container(containers.DeclarativeContainer): s3_client = providers.Resource( session.provided.client.call(), - service_name='s3', + service_name="s3", ) sqs_client = providers.Resource( providers.MethodCaller(session.provided.client), # Alternative syntax - service_name='sqs', + service_name="sqs", ) service1 = providers.Factory( @@ -39,16 +39,16 @@ class Container(containers.DeclarativeContainer): service2 = providers.Factory( Service, - s3_client=session.provided.client.call(service_name='s3'), # Alternative inline syntax - sqs_client=session.provided.client.call(service_name='sqs'), # Alternative inline syntax + s3_client=session.provided.client.call(service_name="s3"), # Alternative inline syntax + sqs_client=session.provided.client.call(service_name="sqs"), # Alternative inline syntax ) def main(): container = Container() - container.config.aws_access_key_id.from_env('AWS_ACCESS_KEY_ID') - container.config.aws_secret_access_key.from_env('AWS_SECRET_ACCESS_KEY') - container.config.aws_session_token.from_env('AWS_SESSION_TOKEN') + container.config.aws_access_key_id.from_env("AWS_ACCESS_KEY_ID") + container.config.aws_secret_access_key.from_env("AWS_SECRET_ACCESS_KEY") + container.config.aws_session_token.from_env("AWS_SESSION_TOKEN") container.init_resources() s3_client = container.s3_client() @@ -68,5 +68,5 @@ def main(): assert service2.sqs_client is sqs_client -if __name__ == '__main__': +if __name__ == "__main__": main()