boto3-refresh-session 1.3.0__py3-none-any.whl → 1.3.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.
@@ -3,5 +3,5 @@ from .session import RefreshableSession
3
3
  from .sts import STSRefreshableSession
4
4
 
5
5
  __all__ = ["RefreshableSession"]
6
- __version__ = "1.3.0"
6
+ __version__ = "1.3.2"
7
7
  __author__ = "Mike Letts"
@@ -9,53 +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
- <<<<<<< feature/custom_get_credentials
39
-
40
- =======
41
-
42
- >>>>>>> main
43
- >>> def your_custom_credential_getter(your_param, another_param):
44
- >>> ...
45
- >>> return {
46
- >>> 'access_key': ...,
47
- >>> 'secret_key': ...,
48
- >>> 'token': ...,
49
- >>> 'expiry_time': ...,
50
- >>> }
51
-
52
- Pass that method to ``RefreshableSession``.
53
-
54
- >>> sess = RefreshableSession(
55
- >>> method='custom',
56
- >>> custom_credentials_method=your_custom_credential_getter,
57
- >>> custom_credentials_methods_args=...,
58
- >>> )
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
+ >>> )
59
55
  """
60
56
 
61
57
  def __init__(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 1.3.0
3
+ Version: 1.3.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
@@ -0,0 +1,11 @@
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,,
@@ -1,11 +0,0 @@
1
- boto3_refresh_session/__init__.py,sha256=6BxJIN_2xE7AAt7aHPP-ca9La7lPMr0lfGg4F4guY8U,200
2
- boto3_refresh_session/custom.py,sha256=oBsHpJ2hvVM_IJ0gTqBskWzTrL5__mPqUe_KBXGpTTA,3294
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.0.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
8
- boto3_refresh_session-1.3.0.dist-info/METADATA,sha256=5dF_ymi5PcKg3fywjz73p3-jZESbyxVa1fj-bhhWYNg,7898
9
- boto3_refresh_session-1.3.0.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
10
- boto3_refresh_session-1.3.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
- boto3_refresh_session-1.3.0.dist-info/RECORD,,