boto3-refresh-session 0.0.10__py3-none-any.whl → 0.0.12__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.
@@ -1,5 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
+ __doc__ = """
4
+ Helper method for generating an automatically refreshing ``boto3.Session``
5
+ object.
6
+ """
3
7
  __all__ = ["AutoRefreshableSession"]
4
8
 
5
9
  from typing import Type
@@ -13,14 +17,14 @@ from botocore.session import get_session
13
17
 
14
18
  @define
15
19
  class AutoRefreshableSession:
16
- """Returns a boto3 Session object which refreshes automatically, no extra
20
+ """Returns a ``boto3.Session`` object which refreshes automatically, no extra
17
21
  steps required.
18
22
 
19
23
  This object is useful for long-running processes where temporary credentials
20
24
  may expire between iterations.
21
25
 
22
- To use this class, you must have `~/.aws/config` or `~/.aws/credentials`
23
- on your machine.
26
+ To use this class, you must have ``~/.aws/config`` or ``~/.aws/credentials``
27
+ configured on your machine.
24
28
 
25
29
  Parameters
26
30
  ----------
@@ -33,14 +37,14 @@ class AutoRefreshableSession:
33
37
  ttl : int, optional
34
38
  Number of seconds until temporary credentials expire, default 900.
35
39
  session_kwargs : dict, optional
36
- Optional keyword arguments for `boto3.Session`.
40
+ Optional keyword arguments for ``boto3.Session``.
37
41
  client_kwargs : dict, optional
38
- Optional keyword arguments for `boto3.Session.client`.
42
+ Optional keyword arguments for ``boto3.Session.client``.
39
43
 
40
44
  Attributes
41
45
  ----------
42
46
  session
43
- Returns a boto3 Session object with credentials which refresh
47
+ Returns a ``boto3.Session`` object with credentials which refresh
44
48
  automatically.
45
49
 
46
50
  Notes
@@ -49,14 +53,13 @@ class AutoRefreshableSession:
49
53
 
50
54
  https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
51
55
 
52
- This class assumes that `~/.aws` exists with `/config` or `/credentials`!
56
+ This class assumes that ``~/.aws`` exists with ``/config`` or ``/credentials``!
53
57
 
54
58
  Examples
55
59
  --------
56
- Here's how to initialize the `boto3.Client.S3` object:
60
+ Here's how to initialize the ``boto3.Client.S3`` object:
57
61
 
58
- >>> from boto3_refresh_session import AutoRefreshableSession
59
- >>> session = AutoRefreshableSession(
62
+ >>> sess = AutoRefreshableSession(
60
63
  >>> region="us-east-1",
61
64
  >>> role_arn="<your-arn>",
62
65
  >>> session_name="test",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 0.0.10
3
+ Version: 0.0.12
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
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.13
19
19
  Requires-Dist: attrs (>=24.3.0,<25.0.0)
20
20
  Requires-Dist: boto3
21
21
  Requires-Dist: botocore
22
+ Project-URL: Documentation, https://michaelthomasletts.github.io/boto3-refresh-session/index.html
22
23
  Project-URL: Repository, https://github.com/michaelthomasletts/boto3-refresh-session
23
24
  Description-Content-Type: text/markdown
24
25
 
@@ -31,43 +32,6 @@ Description-Content-Type: text/markdown
31
32
 
32
33
  A simple Python package for refreshing boto3 sessions automatically.
33
34
 
34
- ## Features
35
- - `boto3_refresh_session.AutoRefreshableSession` method for generating an automatically refreshing `boto3.Session` object.
35
+ ## Usage and Installation
36
36
 
37
- ## Installation
38
-
39
- To install the package using `pip`:
40
-
41
- ```bash
42
- $ pip install boto3-refresh-session
43
- ```
44
-
45
- **This package assumes that you have `~/.aws/config` or `~/.aws/credentials` files or `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables configured on your machine!**
46
-
47
- Refer to the [boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html) for additional details about configuring those credentials on your machine.
48
-
49
- ## Directory
50
-
51
- ```
52
- boto3_refresh_session
53
- ├── __init__.py
54
- └── session.py
55
- ```
56
-
57
- ## Usage
58
-
59
- Here's how to initialize the `boto3.Client.S3` object:
60
-
61
- ```python
62
- from boto3_refresh_session import AutoRefreshableSession
63
-
64
-
65
- session = AutoRefreshableSession(
66
- region="us-east-1", role_arn="<your-arn>", session_name="test"
67
- )
68
- s3_client = session.session.client(service_name="s3")
69
- ```
70
-
71
- ## Contributing
72
-
73
- Refer to [this document](https://github.com/michaelthomasletts/boto3-refresh-session/blob/main/docs/contributing.md) for step by step instructions.
37
+ [Official Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
@@ -0,0 +1,6 @@
1
+ boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
2
+ boto3_refresh_session/session.py,sha256=bxYzA6YaAtLqFEtq5G-zXcEqc3HHAnY84rAJe0snfhg,3896
3
+ boto3_refresh_session-0.0.12.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
4
+ boto3_refresh_session-0.0.12.dist-info/METADATA,sha256=eNTbNYA7iItKdNakJSJi_ECYE3jAhDaSFabeZhF3iOg,1718
5
+ boto3_refresh_session-0.0.12.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
6
+ boto3_refresh_session-0.0.12.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
2
- boto3_refresh_session/session.py,sha256=meuKuZIwIiqKKg-6hySnJItkHgMgaNWrD1UDwxkU1-Y,3828
3
- boto3_refresh_session-0.0.10.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
4
- boto3_refresh_session-0.0.10.dist-info/METADATA,sha256=ahwNzDY9qJpaJNlMEAavrol-Cr9kI0bqYsdinC35p94,2666
5
- boto3_refresh_session-0.0.10.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
6
- boto3_refresh_session-0.0.10.dist-info/RECORD,,