boto3-refresh-session 0.0.15__py3-none-any.whl → 0.0.16__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- boto3_refresh_session-0.0.16.dist-info/METADATA +85 -0
- boto3_refresh_session-0.0.16.dist-info/RECORD +6 -0
- boto3_refresh_session-0.0.15.dist-info/METADATA +0 -37
- boto3_refresh_session-0.0.15.dist-info/RECORD +0 -6
- {boto3_refresh_session-0.0.15.dist-info → boto3_refresh_session-0.0.16.dist-info}/LICENSE +0 -0
- {boto3_refresh_session-0.0.15.dist-info → boto3_refresh_session-0.0.16.dist-info}/WHEEL +0 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
Metadata-Version: 2.3
|
2
|
+
Name: boto3-refresh-session
|
3
|
+
Version: 0.0.16
|
4
|
+
Summary: A simple Python package for refreshing boto3 sessions automatically.
|
5
|
+
Home-page: https://github.com/michaelthomasletts/boto3-refresh-session
|
6
|
+
License: MIT
|
7
|
+
Keywords: boto3,botocore,aws
|
8
|
+
Author: Mike Letts
|
9
|
+
Author-email: michaelthomasletts@gmail.com
|
10
|
+
Maintainer: Michael Letts
|
11
|
+
Maintainer-email: lettsmt@gmail.com
|
12
|
+
Requires-Python: >=3.10
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
19
|
+
Requires-Dist: attrs (>=24.3.0,<25.0.0)
|
20
|
+
Requires-Dist: boto3
|
21
|
+
Requires-Dist: botocore
|
22
|
+
Project-URL: Documentation, https://michaelthomasletts.github.io/boto3-refresh-session/index.html
|
23
|
+
Project-URL: Repository, https://github.com/michaelthomasletts/boto3-refresh-session
|
24
|
+
Description-Content-Type: text/markdown
|
25
|
+
|
26
|
+
# boto3-refresh-session
|
27
|
+
[](https://pypi.org/project/boto3-refresh-session/)
|
28
|
+
[](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
|
29
|
+

|
30
|
+
|
31
|
+
A simple Python package for refreshing boto3 sessions automatically.
|
32
|
+
|
33
|
+
- [Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
|
34
|
+
- [Source Code](https://github.com/michaelthomasletts/boto3-refresh-session)
|
35
|
+
- [PyPI](https://pypi.org/project/boto3-refresh-session/)
|
36
|
+
|
37
|
+
### Why should I use this?
|
38
|
+
|
39
|
+
It is common for data pipelines and workflows that interact with the AWS API via
|
40
|
+
`boto3` to run for a long time and, accordingly, for temporary credentials to
|
41
|
+
expire.
|
42
|
+
|
43
|
+
Usually, engineers deal with that problem one of two ways:
|
44
|
+
|
45
|
+
- `try except` blocks that catch `ClientError` exceptions
|
46
|
+
- A similar approach as that used in this project -- that is, using methods available
|
47
|
+
within `botocore` for refreshing temporary credentials automatically.
|
48
|
+
|
49
|
+
Speaking personally, variations of the code found herein exists in code bases at
|
50
|
+
nearly every company where I have worked. Sometimes, I turned that code into a module;
|
51
|
+
other times, I wrote it from scratch. Clearly, that is inefficient.
|
52
|
+
|
53
|
+
I decided to finally turn that code into a proper Python package with unit testing,
|
54
|
+
automatic documentation, and quality checks; the idea being that, henceforth, depending
|
55
|
+
on my employer's open source policy, I may simply import this package instead of
|
56
|
+
reproducing the code herein for the Nth time.
|
57
|
+
|
58
|
+
If any of that sounds relatable, then `boto3-refresh-session` should help you!
|
59
|
+
|
60
|
+
### Usage
|
61
|
+
|
62
|
+
Simply pass the basic parameters and initialize the `AutoRefreshableSession` object;
|
63
|
+
that's it! You're good to go!
|
64
|
+
|
65
|
+
`AutoRefreshableSession` will refresh
|
66
|
+
temporary credentials for you in the background. In the following example,
|
67
|
+
continue using the `s3_client` object without worry of using `try` and
|
68
|
+
`except` blocks!
|
69
|
+
|
70
|
+
To use this package, your machine must be configured with AWS
|
71
|
+
credentials. To learn more about how `boto3` searches for credentials on a
|
72
|
+
machine, check [this documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html).
|
73
|
+
|
74
|
+
```
|
75
|
+
sess = AutoRefreshableSession(
|
76
|
+
region="<your-region>",
|
77
|
+
role_arn="<your-role-arn>",
|
78
|
+
session_name="<your-session-name>",
|
79
|
+
)
|
80
|
+
s3_client = sess.session.client(service_name="s3")
|
81
|
+
```
|
82
|
+
|
83
|
+
### Authors
|
84
|
+
|
85
|
+
- [Michael Letts](https://michaelthomasletts.github.io/)
|
@@ -0,0 +1,6 @@
|
|
1
|
+
boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
|
2
|
+
boto3_refresh_session/session.py,sha256=KeaQ7kfIZtJqF5rdZNJu7ASvxWX03oRDwjFyw82haeA,4545
|
3
|
+
boto3_refresh_session-0.0.16.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
4
|
+
boto3_refresh_session-0.0.16.dist-info/METADATA,sha256=M2IdMSVKToZvJoawZpeC6d4-7_qCZY69zN4GwtalX_E,3759
|
5
|
+
boto3_refresh_session-0.0.16.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
6
|
+
boto3_refresh_session-0.0.16.dist-info/RECORD,,
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.3
|
2
|
-
Name: boto3-refresh-session
|
3
|
-
Version: 0.0.15
|
4
|
-
Summary: A simple Python package for refreshing boto3 sessions automatically.
|
5
|
-
Home-page: https://github.com/michaelthomasletts/boto3-refresh-session
|
6
|
-
License: MIT
|
7
|
-
Keywords: boto3,botocore,aws
|
8
|
-
Author: Mike Letts
|
9
|
-
Author-email: michaelthomasletts@gmail.com
|
10
|
-
Maintainer: Michael Letts
|
11
|
-
Maintainer-email: lettsmt@gmail.com
|
12
|
-
Requires-Python: >=3.10
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
18
|
-
Classifier: Programming Language :: Python :: 3.13
|
19
|
-
Requires-Dist: attrs (>=24.3.0,<25.0.0)
|
20
|
-
Requires-Dist: boto3
|
21
|
-
Requires-Dist: botocore
|
22
|
-
Project-URL: Documentation, https://michaelthomasletts.github.io/boto3-refresh-session/index.html
|
23
|
-
Project-URL: Repository, https://github.com/michaelthomasletts/boto3-refresh-session
|
24
|
-
Description-Content-Type: text/markdown
|
25
|
-
|
26
|
-
# boto3-refresh-session
|
27
|
-
[](https://pypi.org/project/boto3-refresh-session/)
|
28
|
-
[](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
|
29
|
-

|
30
|
-
|
31
|
-
## Overview
|
32
|
-
|
33
|
-
A simple Python package for refreshing boto3 sessions automatically.
|
34
|
-
|
35
|
-
## Usage and Installation
|
36
|
-
|
37
|
-
[Official Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
|
@@ -1,6 +0,0 @@
|
|
1
|
-
boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
|
2
|
-
boto3_refresh_session/session.py,sha256=KeaQ7kfIZtJqF5rdZNJu7ASvxWX03oRDwjFyw82haeA,4545
|
3
|
-
boto3_refresh_session-0.0.15.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
4
|
-
boto3_refresh_session-0.0.15.dist-info/METADATA,sha256=kkY8lGu6CYvLJav-8hzz-uzQbeoNgVSSKeMBV4Jd-Ig,1718
|
5
|
-
boto3_refresh_session-0.0.15.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
6
|
-
boto3_refresh_session-0.0.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|