boto3-refresh-session 2.0.6__py3-none-any.whl → 2.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ from .methods.sts import STSRefreshableSession
4
4
  from .session import RefreshableSession
5
5
 
6
6
  __all__ = ["RefreshableSession"]
7
- __version__ = "2.0.6"
7
+ __version__ = "2.0.7"
8
8
  __title__ = "boto3-refresh-session"
9
9
  __author__ = "Mike Letts"
10
10
  __maintainer__ = "Mike Letts"
@@ -66,16 +66,16 @@ class CustomRefreshableSession(BaseRefreshableSession, registry_key="custom"):
66
66
  defer_refresh: bool | None = None,
67
67
  **kwargs,
68
68
  ):
69
- self.defer_refresh = defer_refresh is not False
70
- self.refresh_method: RefreshMethod = "custom"
71
69
  super().__init__(**kwargs)
72
-
70
+ self.defer_refresh: bool = defer_refresh is not False
71
+ self.refresh_method: RefreshMethod = "custom"
73
72
  self._custom_get_credentials = custom_credentials_method
74
73
  self._custom_get_credentials_args = (
75
74
  custom_credentials_method_args
76
75
  if custom_credentials_method_args is not None
77
76
  else {}
78
77
  )
78
+ self.__post_init__()
79
79
 
80
80
  def _get_credentials(self) -> TemporaryCredentials:
81
81
  credentials: TemporaryCredentials = self._custom_get_credentials(
@@ -35,13 +35,13 @@ class ECSRefreshableSession(BaseRefreshableSession, registry_key="ecs"):
35
35
  """
36
36
 
37
37
  def __init__(self, defer_refresh: bool | None = None, **kwargs):
38
+ super().__init__(**kwargs)
38
39
  self.defer_refresh: bool = defer_refresh is not False
39
40
  self.refresh_method: RefreshMethod = "ecs-container-metadata"
40
- super().__init__(**kwargs) # mounting refreshable credentials
41
-
42
41
  self._endpoint = self._resolve_endpoint()
43
42
  self._headers = self._build_headers()
44
43
  self._http = self._init_http_session()
44
+ self.__post_init__()
45
45
 
46
46
  def _resolve_endpoint(self) -> str:
47
47
  uri = os.environ.get(_ECS_CREDENTIALS_FULL_URI) or os.environ.get(
@@ -47,10 +47,9 @@ class STSRefreshableSession(BaseRefreshableSession, registry_key="sts"):
47
47
  sts_client_kwargs: STSClientParams | None = None,
48
48
  **kwargs,
49
49
  ):
50
+ super().__init__(**kwargs)
50
51
  self.defer_refresh: bool = defer_refresh is not False
51
52
  self.refresh_method: RefreshMethod = "sts-assume-role"
52
- super().__init__(**kwargs) # mounting refreshable credentials
53
-
54
53
  self.assume_role_kwargs = assume_role_kwargs
55
54
 
56
55
  if sts_client_kwargs is not None:
@@ -67,6 +66,8 @@ class STSRefreshableSession(BaseRefreshableSession, registry_key="sts"):
67
66
  else:
68
67
  self._sts_client = self.client(service_name="sts")
69
68
 
69
+ self.__post_init__()
70
+
70
71
  def _get_credentials(self) -> TemporaryCredentials:
71
72
  temporary_credentials = self._sts_client.assume_role(
72
73
  **self.assume_role_kwargs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 2.0.6
3
+ Version: 2.0.7
4
4
  Summary: A simple Python package for refreshing the temporary security credentials in a boto3.session.Session object automatically.
5
5
  License: MIT
6
6
  Keywords: boto3,botocore,aws,sts,ecs,credentials,token,refresh
@@ -1,17 +1,17 @@
1
- boto3_refresh_session/__init__.py,sha256=ngE9JZBwTOaSEfIBSSv7MAAKx5YQDz6gfVdNERSolSE,387
1
+ boto3_refresh_session/__init__.py,sha256=3VYnpC-52TTWbTfkoYwW5o7ImCNWsLGeKNWk5CmL5k8,387
2
2
  boto3_refresh_session/exceptions.py,sha256=cP5d9S8QnUEwXIU3pzMGr6jMOz447kddNJ_UIRERMrk,964
3
3
  boto3_refresh_session/methods/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- boto3_refresh_session/methods/custom.py,sha256=W12lt83jrSy4MsCBEdd2BfeG1v509cmb3DxAMsKqijI,3812
5
- boto3_refresh_session/methods/ecs.py,sha256=6iquaA1aKvEKr_A6ySxMXnTC9drZXjzdM025S30Dyqo,3736
4
+ boto3_refresh_session/methods/custom.py,sha256=JDDfBszAesNV2gSv8lJvGxCpbM9-lUn0L9HDt-rPETM,3846
5
+ boto3_refresh_session/methods/ecs.py,sha256=qejldriuTVpHPSkquHeo4vLGbe0_WAg_iayuJFk6W9Q,3728
6
6
  boto3_refresh_session/methods/iot/__init__.typed,sha256=Z33nIB6oCsz9TZwikHfNHgY1SKxkSCdB5rwdPSUl3C4,135
7
7
  boto3_refresh_session/methods/iot/certificate.typed,sha256=yvKptwH-GagBREI_1AXs_mCaU6vL3AcUDQ58vn7V8QM,1774
8
8
  boto3_refresh_session/methods/iot/cognito.typed,sha256=0VorzOXHpsVemiGWZzHE9fuX-MZcpqzWQ4nK3gNDUMg,389
9
9
  boto3_refresh_session/methods/iot/core.typed,sha256=tL-ngB2XYq0XtxhS9mbggCJYdX3eEE0u1Gvcq8sEYGE,1422
10
- boto3_refresh_session/methods/sts.py,sha256=KuWCUmGUOsvakDYSK1zXRlRYHgIXqdrcvXmszqGBg0I,3233
10
+ boto3_refresh_session/methods/sts.py,sha256=SjeVNXXB50wLINr5GhjALrnytPleu6UeE0BBAJU28Lc,3226
11
11
  boto3_refresh_session/session.py,sha256=_Z3uB5Xq3S-dFqOFmWhMQbcd__NPGThjULLPStHI6E4,2914
12
12
  boto3_refresh_session/utils.py,sha256=z-lN5szAETD88-h4pNEwBDcqAPqzeGo5QJ0hNUJdDWA,5560
13
- boto3_refresh_session-2.0.6.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
14
- boto3_refresh_session-2.0.6.dist-info/METADATA,sha256=KkQk5KZbB77r5KgGMKVMx5H6HElHhrtj0SQ6O1dz9c0,8795
15
- boto3_refresh_session-2.0.6.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
16
- boto3_refresh_session-2.0.6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
- boto3_refresh_session-2.0.6.dist-info/RECORD,,
13
+ boto3_refresh_session-2.0.7.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
14
+ boto3_refresh_session-2.0.7.dist-info/METADATA,sha256=fhSKcYLuhphxBm8uLmzAKt7kO4YE1dbl3gsPj_Li4DU,8795
15
+ boto3_refresh_session-2.0.7.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
16
+ boto3_refresh_session-2.0.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
+ boto3_refresh_session-2.0.7.dist-info/RECORD,,