boto3-refresh-session 1.3.2__py3-none-any.whl → 1.3.4__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.
@@ -3,5 +3,5 @@ from .session import RefreshableSession
3
3
  from .sts import STSRefreshableSession
4
4
 
5
5
  __all__ = ["RefreshableSession"]
6
- __version__ = "1.3.2"
6
+ __version__ = "1.3.4"
7
7
  __author__ = "Mike Letts"
@@ -9,49 +9,49 @@ from .session import BaseRefreshableSession
9
9
 
10
10
  class CustomRefreshableSession(BaseRefreshableSession, method="custom"):
11
11
  """A :class:`boto3.session.Session` object that automatically refreshes temporary credentials
12
- returned by a custom credential getter provided by the user. Useful for users with highly
13
- sophisticated or idiosyncratic authentication flows.
14
-
15
- Parameters
16
- ----------
17
- custom_credentials_method: Callable
18
- Required. Accepts a Python function that returns temporary AWS security credentials. That
19
- function must return a dictionary containing 'access_key', 'secret_key', 'token', and
20
- 'expiry_time' when called.
21
- custom_credentials_method_args : dict[str, Any], optional
22
- Optional keyword arguments for the function passed to the ``custom_credentials_method``
23
- parameter.
24
- defer_refresh : bool, optional
25
- If ``True`` then temporary credentials are not automatically refreshed until
26
- they are explicitly needed. If ``False`` then temporary credentials refresh
27
- immediately upon expiration. It is highly recommended that you use ``True``.
28
- Default is ``True``.
29
-
30
- Other Parameters
31
- ----------------
32
- kwargs : dict
33
- Optional keyword arguments for the :class:`boto3.session.Session` object.
34
-
35
- Examples
36
- --------
37
- Write (or import) the method for obtaining temporary AWS security credentials.
38
-
39
- >>> def your_custom_credential_getter(your_param, another_param):
40
- >>> ...
41
- >>> return {
42
- >>> 'access_key': ...,
43
- >>> 'secret_key': ...,
44
- >>> 'token': ...,
45
- >>> 'expiry_time': ...,
46
- >>> }
47
-
48
- Pass that method to ``RefreshableSession``.
49
-
50
- >>> sess = RefreshableSession(
51
- >>> method='custom',
52
- >>> custom_credentials_method=your_custom_credential_getter,
53
- >>> custom_credentials_methods_args=...,
54
- >>> )
12
+ returned by a custom credential getter provided by the user. Useful for users with highly
13
+ sophisticated or idiosyncratic authentication flows.
14
+
15
+ Parameters
16
+ ----------
17
+ custom_credentials_method: Callable
18
+ Required. Accepts a Python function that returns temporary AWS security credentials. That
19
+ function must return a dictionary containing 'access_key', 'secret_key', 'token', and
20
+ 'expiry_time' when called.
21
+ custom_credentials_method_args : dict[str, Any], optional
22
+ Optional keyword arguments for the function passed to the ``custom_credentials_method``
23
+ parameter.
24
+ defer_refresh : bool, optional
25
+ If ``True`` then temporary credentials are not automatically refreshed until
26
+ they are explicitly needed. If ``False`` then temporary credentials refresh
27
+ immediately upon expiration. It is highly recommended that you use ``True``.
28
+ Default is ``True``.
29
+
30
+ Other Parameters
31
+ ----------------
32
+ kwargs : dict
33
+ Optional keyword arguments for the :class:`boto3.session.Session` object.
34
+
35
+ Examples
36
+ --------
37
+ Write (or import) the method for obtaining temporary AWS security credentials.
38
+
39
+ >>> def your_custom_credential_getter(your_param, another_param):
40
+ >>> ...
41
+ >>> return {
42
+ >>> 'access_key': ...,
43
+ >>> 'secret_key': ...,
44
+ >>> 'token': ...,
45
+ >>> 'expiry_time': ...,
46
+ >>> }
47
+
48
+ Pass that method to ``RefreshableSession``.
49
+
50
+ >>> sess = RefreshableSession(
51
+ >>> method='custom',
52
+ >>> custom_credentials_method=your_custom_credential_getter,
53
+ >>> custom_credentials_methods_args=...,
54
+ >>> )
55
55
  """
56
56
 
57
57
  def __init__(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 1.3.2
3
+ Version: 1.3.4
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
@@ -83,8 +83,10 @@ Description-Content-Type: text/markdown
83
83
  - Supports automatic credential refresh methods for various AWS services:
84
84
  - STS
85
85
  - ECS
86
- - Supports `assume_role` configuration, custom STS clients, and profile / region configuration, as well as all other parameters supported by `boto3.session.Session`
86
+ - Supports custom authentication methods for complicated authentication flows
87
+ - Natively supports all parameters supported by `boto3.session.Session`
87
88
  - Tested, documented, and published to PyPI
89
+ - Future releases will include support for EC2, IoT, SSO, and OIDC
88
90
 
89
91
  ## Recognition, Adoption, and Testimonials
90
92
 
@@ -100,10 +102,6 @@ A testimonial from a Cyber Security Engineer at a FAANG company:
100
102
 
101
103
  The following line plot illustrates the adoption of BRS over the last three months in terms of average daily downloads over a rolling seven day window.
102
104
 
103
- <p align="center">
104
- <img src="https://raw.githubusercontent.com/michaelthomasletts/boto3-refresh-session/refs/heads/main/doc/downloads.png" />
105
- </p>
106
-
107
105
  ## Installation
108
106
 
109
107
  ```bash
@@ -0,0 +1,11 @@
1
+ boto3_refresh_session/__init__.py,sha256=CKuebAI3ak--HtZHABu7NmtisPYZvx27UyPay98xCOc,200
2
+ boto3_refresh_session/custom.py,sha256=ZnN94A69Eku9L-kHZ7JJxn_aWbrt6mJDWOIEWrJrIcY,3229
3
+ boto3_refresh_session/ecs.py,sha256=WIC5mlbcEnM1oo-QXmmtiw2mjFDn01hBfcFh67ku42A,3713
4
+ boto3_refresh_session/exceptions.py,sha256=qcFzdIuK5PZirs77H_Kb64S9QFb6cn2OJtirjvaRLiY,972
5
+ boto3_refresh_session/session.py,sha256=ak8lvgoHMObaJgL4c80ih4bptRHS3ASojnaWdbxn5kA,5246
6
+ boto3_refresh_session/sts.py,sha256=paIgbmn9a3cATNX-6AEGxnSGNZnX1pj4rRQmh8gQSKs,3132
7
+ boto3_refresh_session-1.3.4.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
8
+ boto3_refresh_session-1.3.4.dist-info/METADATA,sha256=Nwbut9vTqmaEGvGrblAy4k6RXOTrMy1w_L3dlH0E43o,7800
9
+ boto3_refresh_session-1.3.4.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
10
+ boto3_refresh_session-1.3.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
+ boto3_refresh_session-1.3.4.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- boto3_refresh_session/__init__.py,sha256=gZg7-ebG3EqS5dwPS-2Hq96bzYS1JOK_hkgwx54dXk8,200
2
- boto3_refresh_session/custom.py,sha256=i7jVteafmZRIqt1gLbS3VLQhAZ8yn6sp5Hj0dSH4qZk,3377
3
- boto3_refresh_session/ecs.py,sha256=WIC5mlbcEnM1oo-QXmmtiw2mjFDn01hBfcFh67ku42A,3713
4
- boto3_refresh_session/exceptions.py,sha256=qcFzdIuK5PZirs77H_Kb64S9QFb6cn2OJtirjvaRLiY,972
5
- boto3_refresh_session/session.py,sha256=ak8lvgoHMObaJgL4c80ih4bptRHS3ASojnaWdbxn5kA,5246
6
- boto3_refresh_session/sts.py,sha256=paIgbmn9a3cATNX-6AEGxnSGNZnX1pj4rRQmh8gQSKs,3132
7
- boto3_refresh_session-1.3.2.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
8
- boto3_refresh_session-1.3.2.dist-info/METADATA,sha256=e4fDDCOMnX0T33lboeP5OXDCidp_UpZMJXi8oWcpmDY,7898
9
- boto3_refresh_session-1.3.2.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
10
- boto3_refresh_session-1.3.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
- boto3_refresh_session-1.3.2.dist-info/RECORD,,