boto3-refresh-session 1.1.0__py3-none-any.whl → 1.1.2__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.
@@ -2,5 +2,5 @@ from .session import RefreshableSession
2
2
  from .sts import STSRefreshableSession
3
3
 
4
4
  __all__ = ["RefreshableSession"]
5
- __version__ = "1.1.0"
5
+ __version__ = "1.1.2"
6
6
  __author__ = "Mike Letts"
@@ -0,0 +1,44 @@
1
+ s = """
2
+ lbh orybat gb zr,
3
+ naq v, lbh.
4
+
5
+ jr ner abg jub jr fnl jr ner.
6
+ abg jub jr guvax jr ner.
7
+ jr ner jub bguref guvax jr ner --
8
+ jung bhe npgvbaf fnl jr ner.
9
+
10
+ fb znxr jung lbh ohvyq frysyrff.
11
+ ornhgvshy. ebohfg. cresrpg.
12
+
13
+ zrqvbpevgl yherf hf sebz qvivavgl.
14
+ gur pybfre gb cresrpgvba jr nfpraq,
15
+ gur zber fgevqrag rivy tebjf --
16
+ orpnhfr rivy pnaabg rkvfg
17
+ vs nyy vf cresrpg.
18
+
19
+ n guvat vf jung vg vf abg.
20
+ n guvat jvgu ab bgure vf abguvat.
21
+ naq abguvat
22
+ vf gur zbfg cresrpg guvat bs nyy.
23
+
24
+ ubjrire lbh hfr guvf fbsgjner,
25
+ jungrire lbh ohvyq --
26
+ znxr vg cresrpg.
27
+ qb fb sbe rirelbar ohg lbhefrys.
28
+
29
+ znl jr or sbetbggra
30
+ naq bhe npgvbaf svanyyl fvyrag.
31
+ """
32
+
33
+
34
+ def how(text: str, shift: int = 13) -> str:
35
+ def rotate(c: str) -> str:
36
+ if 'a' <= c <= 'z':
37
+ return chr((ord(c) - ord('a') + shift) % 26 + ord('a'))
38
+ elif 'A' <= c <= 'Z':
39
+ return chr((ord(c) - ord('A') + shift) % 26 + ord('A'))
40
+ return c
41
+ return ''.join(rotate(c) for c in text)
42
+
43
+
44
+ print(how(s.strip()))
@@ -44,8 +44,6 @@ __all__ = ["STSRefreshableSession"]
44
44
  from typing import Any
45
45
  from warnings import warn
46
46
 
47
- from boto3 import client
48
-
49
47
  from .session import BaseRefreshableSession
50
48
 
51
49
 
@@ -90,9 +88,11 @@ class STSRefreshableSession(BaseRefreshableSession, method="sts"):
90
88
  "The sts_client_kwargs parameter cannot contain values for service_name. Reverting to service_name = 'sts'."
91
89
  )
92
90
  del sts_client_kwargs["service_name"]
93
- self._sts_client = client(service_name="sts", **sts_client_kwargs)
91
+ self._sts_client = self.client(
92
+ service_name="sts", **sts_client_kwargs
93
+ )
94
94
  else:
95
- self._sts_client = client(service_name="sts")
95
+ self._sts_client = self.client(service_name="sts")
96
96
 
97
97
  # mounting refreshable credentials
98
98
  self._refresh_using(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 1.1.0
3
+ Version: 1.1.2
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
@@ -56,7 +56,7 @@ Description-Content-Type: text/markdown
56
56
  </a>
57
57
 
58
58
  <a href="https://pepy.tech/project/boto3-refresh-session">
59
- <img src="https://img.shields.io/badge/downloads-57.4K-red?logo=python&color=%23FF0000&label=Downloads" alt="Downloads"/>
59
+ <img src="https://img.shields.io/badge/downloads-58.3K-red?logo=python&color=%23FF0000&label=Downloads" alt="Downloads"/>
60
60
  </a>
61
61
 
62
62
  <a href="https://michaelthomasletts.github.io/boto3-refresh-session/index.html">
@@ -165,6 +165,6 @@ Eventually, I decided to build boto3-refresh-session as a proper open-source Pyt
165
165
  - Integrated with boto3 idioms
166
166
  - Equipped with automatic documentation and CI tooling
167
167
 
168
- **The goal:** to solve a real, recurring problem once — cleanly, consistently, and for everyone -- with multiple refresh strategies.
168
+ **The goal:** to solve a real, recurring problem once — cleanly, consistently, and for everyone - with multiple refresh strategies.
169
169
 
170
170
  If you've ever written the same AWS credential-refresh boilerplate more than once, this library is for you.
@@ -0,0 +1,9 @@
1
+ boto3_refresh_session/__init__.py,sha256=WPNU8U79usNSOl7FKoeBQrUhdaX4Yvtpwl8eJbQcTXI,161
2
+ boto3_refresh_session/how.py,sha256=zBfxfvQCzqJT8VJ8VTmUUzQUupRkSYXP8yOzvIXruUU,994
3
+ boto3_refresh_session/session.py,sha256=J3FW6nkc_s9C0gj1Xs1wKaCWQMzR6S4ncDKDqu1DYxk,4879
4
+ boto3_refresh_session/sts.py,sha256=P8lWxQLslXDeYSuvHuy0Le6CC5SIXxQ9D5DZFmwwE1Q,4057
5
+ boto3_refresh_session-1.1.2.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
6
+ boto3_refresh_session-1.1.2.dist-info/METADATA,sha256=25RIB9z4wwR1D3Gts08W6tNDkxH-5hW0Hz8hBX9KOYk,7533
7
+ boto3_refresh_session-1.1.2.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
8
+ boto3_refresh_session-1.1.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
9
+ boto3_refresh_session-1.1.2.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- boto3_refresh_session/__init__.py,sha256=q_SWX2IjsvgROUhgsVpW3h70mSbnIz1fPIYUbsxJSY8,161
2
- boto3_refresh_session/session.py,sha256=J3FW6nkc_s9C0gj1Xs1wKaCWQMzR6S4ncDKDqu1DYxk,4879
3
- boto3_refresh_session/sts.py,sha256=8vUBPTtoqJIgF-NOg4617WbmJ92GiKcmsVDdINieoFo,4043
4
- boto3_refresh_session-1.1.0.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
5
- boto3_refresh_session-1.1.0.dist-info/METADATA,sha256=Ny4vrpfNYQdXGuBAkAJW8LPMqO54qysxVHfNsJxCKts,7534
6
- boto3_refresh_session-1.1.0.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
7
- boto3_refresh_session-1.1.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
8
- boto3_refresh_session-1.1.0.dist-info/RECORD,,