boto3-refresh-session 0.0.24__tar.gz → 0.0.26__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/PKG-INFO +5 -1
- {boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/README.md +4 -0
- {boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/boto3_refresh_session/session.py +6 -5
- {boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/pyproject.toml +1 -1
- {boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/LICENSE +0 -0
- {boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/boto3_refresh_session/__init__.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: boto3-refresh-session
|
3
|
-
Version: 0.0.
|
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
|
[](https://pypi.org/project/boto3-refresh-session/)
|
28
28
|
[](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
|
29
29
|

|
30
|
+

|
31
|
+

|
32
|
+

|
33
|
+

|
30
34
|
|
31
35
|

|
32
36
|
|
@@ -2,6 +2,10 @@
|
|
2
2
|
[](https://pypi.org/project/boto3-refresh-session/)
|
3
3
|
[](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
|
4
4
|

|
5
|
+

|
6
|
+

|
7
|
+

|
8
|
+

|
5
9
|
|
6
10
|

|
7
11
|
|
{boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/boto3_refresh_session/session.py
RENAMED
@@ -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(
|
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
|
-
|
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 =
|
134
|
+
__temporary_credentials = __sts_client.assume_role(
|
134
135
|
RoleArn=self.role_arn,
|
135
136
|
RoleSessionName=self.session_name,
|
136
137
|
DurationSeconds=self.ttl,
|
File without changes
|
{boto3_refresh_session-0.0.24 → boto3_refresh_session-0.0.26}/boto3_refresh_session/__init__.py
RENAMED
File without changes
|