boto3-refresh-session 0.0.24__py3-none-any.whl → 0.0.26__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ from typing import Type
22
22
 
23
23
  from attrs import define, field
24
24
  from attrs.validators import ge, instance_of, optional
25
- from boto3 import Session
25
+ from boto3 import Session, client
26
26
  from botocore.credentials import (
27
27
  DeferredRefreshableCredentials,
28
28
  RefreshableCredentials,
@@ -115,7 +115,9 @@ class AutoRefreshableSession:
115
115
  )
116
116
 
117
117
  __session._credentials = __credentials
118
- self.session = Session(botocore_session=__session)
118
+ self.session = Session(
119
+ botocore_session=__session, **self.session_kwargs
120
+ )
119
121
 
120
122
  def _get_credentials(self) -> dict:
121
123
  """Returns temporary credentials via AWS STS.
@@ -126,11 +128,10 @@ class AutoRefreshableSession:
126
128
  AWS temporary credentials.
127
129
  """
128
130
 
129
- __session = Session(region_name=self.region, **self.session_kwargs)
130
- __client = __session.client(
131
+ __sts_client = client(
131
132
  service_name="sts", region_name=self.region, **self.client_kwargs
132
133
  )
133
- __temporary_credentials = __client.assume_role(
134
+ __temporary_credentials = __sts_client.assume_role(
134
135
  RoleArn=self.role_arn,
135
136
  RoleSessionName=self.session_name,
136
137
  DurationSeconds=self.ttl,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 0.0.24
3
+ Version: 0.0.26
4
4
  Summary: A simple Python package for refreshing boto3 sessions automatically.
5
5
  Home-page: https://github.com/michaelthomasletts/boto3-refresh-session
6
6
  License: MIT
@@ -27,6 +27,10 @@ Description-Content-Type: text/markdown
27
27
  [![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)
28
28
  [![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/boto3-refresh-session/push_pullrequest.yml?logo=github)](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
29
29
  ![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)
30
+ ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/michaelthomasletts/boto3-refresh-session/total?logo=github)
31
+ ![GitHub last commit](https://img.shields.io/github/last-commit/michaelthomasletts/boto3-refresh-session?logo=github)
32
+ ![GitHub Repo stars](https://img.shields.io/github/stars/michaelthomasletts/boto3-refresh-session?logo=github)
33
+ ![GitHub forks](https://img.shields.io/github/forks/michaelthomasletts/boto3-refresh-session?logo=github)
30
34
 
31
35
  ![BRS Image](https://raw.githubusercontent.com/michaelthomasletts/boto3-refresh-session/refs/heads/main/doc/brs.png)
32
36
 
@@ -0,0 +1,6 @@
1
+ boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
2
+ boto3_refresh_session/session.py,sha256=Wdr95s9DQLc-d7JKYOzqoD9q51KsZjENmcJLm4EzsPY,5267
3
+ boto3_refresh_session-0.0.26.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
4
+ boto3_refresh_session-0.0.26.dist-info/METADATA,sha256=6eH1e0ImkvPW9EkDph3a11WgJUeUigKoxKhVOGRedhU,4472
5
+ boto3_refresh_session-0.0.26.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
6
+ boto3_refresh_session-0.0.26.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
2
- boto3_refresh_session/session.py,sha256=nrUQRTGmXJGKvUJbr0nw56lx9Ww3BlDy8ceOoFBA6O0,5292
3
- boto3_refresh_session-0.0.24.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
4
- boto3_refresh_session-0.0.24.dist-info/METADATA,sha256=iXy14yzlkd2SHzuKHubtY2k0-8QktHchlySrRLu0T7A,3990
5
- boto3_refresh_session-0.0.24.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
6
- boto3_refresh_session-0.0.24.dist-info/RECORD,,