boto3-refresh-session 0.0.20__tar.gz → 0.0.22__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.0.20
3
+ Version: 0.0.22
4
4
  Summary: A simple Python package for refreshing boto3 sessions automatically.
5
5
  Home-page: https://github.com/michaelthomasletts/boto3-refresh-session
6
6
  License: MIT
@@ -74,10 +74,10 @@ credentials. To learn more about how `boto3` searches for credentials on a
74
74
  machine, check [this documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html).
75
75
 
76
76
  ```python
77
- from boto3_refresh_session import AutoRefreshableSession
77
+ import boto3_refresh_session as brs
78
78
 
79
79
 
80
- sess = AutoRefreshableSession(
80
+ sess = brs.AutoRefreshableSession(
81
81
  region="<your-region>",
82
82
  role_arn="<your-role-arn>",
83
83
  session_name="<your-session-name>",
@@ -49,10 +49,10 @@ credentials. To learn more about how `boto3` searches for credentials on a
49
49
  machine, check [this documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html).
50
50
 
51
51
  ```python
52
- from boto3_refresh_session import AutoRefreshableSession
52
+ import boto3_refresh_session as brs
53
53
 
54
54
 
55
- sess = AutoRefreshableSession(
55
+ sess = brs.AutoRefreshableSession(
56
56
  region="<your-region>",
57
57
  role_arn="<your-role-arn>",
58
58
  session_name="<your-session-name>",
@@ -1,12 +1,12 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  __doc__ = """
4
- Helper method for generating an automatically refreshing ``boto3.Session``
4
+ Helper method for generating an automatically refreshing :class:`boto3.session.Session`
5
5
  object.
6
6
 
7
7
  .. warning::
8
8
  ``AutoRefreshableSession`` was not tested for manually passing hard-coded
9
- account credentials to the ``boto3.Session`` or ``boto3.Session.client``
9
+ account credentials to the :class:`boto3.session.Session` or ``boto3.client``
10
10
  objects! There are optional ``session_kwargs`` and ``client_kwargs``
11
11
  parameters available for passing hard-coded account credentials, which
12
12
  should work; however, that cannot be guaranteed! In any case, the ``boto3``
@@ -29,14 +29,11 @@ from botocore.session import get_session
29
29
 
30
30
  @define
31
31
  class AutoRefreshableSession:
32
- """Returns a ``boto3.Session`` object which refreshes automatically, no extra
32
+ """Returns a :class:`boto3.session.Session` object which refreshes automatically, no extra
33
33
  steps required.
34
34
 
35
35
  This object is useful for long-running processes where temporary credentials
36
- may expire between iterations.
37
-
38
- To use this class, you must have ``~/.aws/config`` or ``~/.aws/credentials``
39
- configured on your machine.
36
+ may expire.
40
37
 
41
38
  Parameters
42
39
  ----------
@@ -49,29 +46,26 @@ class AutoRefreshableSession:
49
46
  ttl : int, optional
50
47
  Number of seconds until temporary credentials expire, default 900.
51
48
  session_kwargs : dict, optional
52
- Optional keyword arguments for ``boto3.Session``.
49
+ Optional keyword arguments for :class:`boto3.session.Session`.
53
50
  client_kwargs : dict, optional
54
- Optional keyword arguments for ``boto3.Session.client``.
51
+ Optional keyword arguments for ``boto3.client``.
55
52
 
56
53
  Attributes
57
54
  ----------
58
55
  session
59
- Returns a ``boto3.Session`` object with credentials which refresh
56
+ Returns a :class:`boto3.session.Session` object with credentials which refresh
60
57
  automatically.
61
58
 
62
59
  Notes
63
60
  -----
64
- boto3 employs a variety of methods (in order) to identify credentials:
65
-
66
- https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
67
-
68
- This class assumes that ``~/.aws`` exists with ``/config`` or ``/credentials``!
61
+ Check the :ref:`authorization documentation <authorization>` for additional
62
+ information concerning how to authorize access to AWS.
69
63
 
70
64
  Examples
71
65
  --------
72
- Here's how to initialize the ``boto3.Client.S3`` object:
66
+ Here's how to initialize this object:
73
67
 
74
- >>> sess = AutoRefreshableSession(
68
+ >>> sess = brs.AutoRefreshableSession(
75
69
  >>> region="us-east-1",
76
70
  >>> role_arn="<your-arn>",
77
71
  >>> session_name="test",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "0.0.20"
3
+ version = "0.0.22"
4
4
  description = "A simple Python package for refreshing boto3 sessions automatically."
5
5
  authors = [
6
6
  {name = "Mike Letts",email = "michaelthomasletts@gmail.com"}