boto3-refresh-session 0.0.15__tar.gz → 0.0.16__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
+ [![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)
28
+ [![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/boto3-refresh-session/push_pullrequest.yml?logo=github)](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
29
+ ![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)
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,60 @@
1
+ # boto3-refresh-session
2
+ [![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)
3
+ [![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/boto3-refresh-session/push_pullrequest.yml?logo=github)](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
4
+ ![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)
5
+
6
+ A simple Python package for refreshing boto3 sessions automatically.
7
+
8
+ - [Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
9
+ - [Source Code](https://github.com/michaelthomasletts/boto3-refresh-session)
10
+ - [PyPI](https://pypi.org/project/boto3-refresh-session/)
11
+
12
+ ### Why should I use this?
13
+
14
+ It is common for data pipelines and workflows that interact with the AWS API via
15
+ `boto3` to run for a long time and, accordingly, for temporary credentials to
16
+ expire.
17
+
18
+ Usually, engineers deal with that problem one of two ways:
19
+
20
+ - `try except` blocks that catch `ClientError` exceptions
21
+ - A similar approach as that used in this project -- that is, using methods available
22
+ within `botocore` for refreshing temporary credentials automatically.
23
+
24
+ Speaking personally, variations of the code found herein exists in code bases at
25
+ nearly every company where I have worked. Sometimes, I turned that code into a module;
26
+ other times, I wrote it from scratch. Clearly, that is inefficient.
27
+
28
+ I decided to finally turn that code into a proper Python package with unit testing,
29
+ automatic documentation, and quality checks; the idea being that, henceforth, depending
30
+ on my employer's open source policy, I may simply import this package instead of
31
+ reproducing the code herein for the Nth time.
32
+
33
+ If any of that sounds relatable, then `boto3-refresh-session` should help you!
34
+
35
+ ### Usage
36
+
37
+ Simply pass the basic parameters and initialize the `AutoRefreshableSession` object;
38
+ that's it! You're good to go!
39
+
40
+ `AutoRefreshableSession` will refresh
41
+ temporary credentials for you in the background. In the following example,
42
+ continue using the `s3_client` object without worry of using `try` and
43
+ `except` blocks!
44
+
45
+ To use this package, your machine must be configured with AWS
46
+ credentials. To learn more about how `boto3` searches for credentials on a
47
+ machine, check [this documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html).
48
+
49
+ ```
50
+ sess = AutoRefreshableSession(
51
+ region="<your-region>",
52
+ role_arn="<your-role-arn>",
53
+ session_name="<your-session-name>",
54
+ )
55
+ s3_client = sess.session.client(service_name="s3")
56
+ ```
57
+
58
+ ### Authors
59
+
60
+ - [Michael Letts](https://michaelthomasletts.github.io/)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "0.0.15"
3
+ version = "0.0.16"
4
4
  description = "A simple Python package for refreshing boto3 sessions automatically."
5
5
  authors = [
6
6
  {name = "Mike Letts",email = "michaelthomasletts@gmail.com"}
@@ -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
- [![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)
28
- [![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/boto3-refresh-session/push_pullrequest.yml?logo=github)](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
29
- ![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)
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,12 +0,0 @@
1
- # boto3-refresh-session
2
- [![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)
3
- [![Workflow](https://img.shields.io/github/actions/workflow/status/michaelthomasletts/boto3-refresh-session/push_pullrequest.yml?logo=github)](https://github.com/michaelthomasletts/boto3-refresh-session/actions/workflows/push_pullrequest.yml)
4
- ![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)
5
-
6
- ## Overview
7
-
8
- A simple Python package for refreshing boto3 sessions automatically.
9
-
10
- ## Usage and Installation
11
-
12
- [Official Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)