boto3-refresh-session 0.1.14__tar.gz → 0.1.16__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 0.1.14
3
+ Version: 0.1.16
4
4
  Summary: A simple Python package for refreshing boto3 sessions automatically.
5
5
  License: MIT
6
6
  Keywords: boto3,botocore,aws
@@ -14,6 +14,7 @@ object.
14
14
  """
15
15
  __all__ = ["AutoRefreshableSession"]
16
16
 
17
+ from logging import getLogger
17
18
  from typing import Type
18
19
 
19
20
  from attrs import define, field
@@ -25,6 +26,9 @@ from botocore.credentials import (
25
26
  )
26
27
  from botocore.session import get_session
27
28
 
29
+ logger = getLogger(__name__)
30
+ has_logged = False
31
+
28
32
 
29
33
  @define
30
34
  class AutoRefreshableSession:
@@ -124,6 +128,12 @@ class AutoRefreshableSession:
124
128
  AWS temporary credentials.
125
129
  """
126
130
 
131
+ global has_logged
132
+ logger.info(
133
+ f"{'Fetching' if not has_logged else 'Refreshing'} temporary AWS credentials"
134
+ )
135
+ has_logged = True
136
+
127
137
  __sts_client = client(
128
138
  service_name="sts", region_name=self.region, **self.client_kwargs
129
139
  )
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "0.1.14"
3
+ version = "0.1.16"
4
4
  description = "A simple Python package for refreshing boto3 sessions automatically."
5
5
  authors = [
6
6
  {name = "Mike Letts",email = "lettsmt@gmail.com"}