boto3-refresh-session 0.0.9__py3-none-any.whl → 0.0.11__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- boto3_refresh_session/session.py +15 -4
- {boto3_refresh_session-0.0.9.dist-info → boto3_refresh_session-0.0.11.dist-info}/METADATA +6 -5
- boto3_refresh_session-0.0.11.dist-info/RECORD +6 -0
- boto3_refresh_session-0.0.9.dist-info/RECORD +0 -6
- {boto3_refresh_session-0.0.9.dist-info → boto3_refresh_session-0.0.11.dist-info}/LICENSE +0 -0
- {boto3_refresh_session-0.0.9.dist-info → boto3_refresh_session-0.0.11.dist-info}/WHEEL +0 -0
boto3_refresh_session/session.py
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
"""
|
2
|
+
Helper method for generating an automatically refreshing `boto3.Session`
|
3
|
+
object.
|
4
|
+
|
5
|
+
.. currentmodule:: boto3_refresh_session.session
|
6
|
+
|
7
|
+
.. autosummary::
|
8
|
+
:toctree: session/
|
9
|
+
|
10
|
+
AutoRefreshableSession
|
11
|
+
"""
|
12
|
+
|
1
13
|
from __future__ import annotations
|
2
14
|
|
3
15
|
__all__ = ["AutoRefreshableSession"]
|
@@ -22,7 +34,7 @@ class AutoRefreshableSession:
|
|
22
34
|
To use this class, you must have `~/.aws/config` or `~/.aws/credentials`
|
23
35
|
on your machine.
|
24
36
|
|
25
|
-
|
37
|
+
Parameters
|
26
38
|
----------
|
27
39
|
region : str
|
28
40
|
AWS region name.
|
@@ -37,8 +49,8 @@ class AutoRefreshableSession:
|
|
37
49
|
client_kwargs : dict, optional
|
38
50
|
Optional keyword arguments for `boto3.Session.client`.
|
39
51
|
|
40
|
-
|
41
|
-
|
52
|
+
Attributes
|
53
|
+
----------
|
42
54
|
session
|
43
55
|
Returns a boto3 Session object with credentials which refresh
|
44
56
|
automatically.
|
@@ -55,7 +67,6 @@ class AutoRefreshableSession:
|
|
55
67
|
--------
|
56
68
|
Here's how to initialize the `boto3.Client.S3` object:
|
57
69
|
|
58
|
-
>>> from boto3_refresh_session import AutoRefreshableSession
|
59
70
|
>>> session = AutoRefreshableSession(
|
60
71
|
>>> region="us-east-1",
|
61
72
|
>>> role_arn="<your-arn>",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: boto3-refresh-session
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.11
|
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,6 +32,10 @@ Description-Content-Type: text/markdown
|
|
31
32
|
|
32
33
|
A simple Python package for refreshing boto3 sessions automatically.
|
33
34
|
|
35
|
+
## Links
|
36
|
+
|
37
|
+
[Official Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
|
38
|
+
|
34
39
|
## Features
|
35
40
|
- `boto3_refresh_session.AutoRefreshableSession` method for generating an automatically refreshing `boto3.Session` object.
|
36
41
|
|
@@ -67,7 +72,3 @@ session = AutoRefreshableSession(
|
|
67
72
|
)
|
68
73
|
s3_client = session.session.client(service_name="s3")
|
69
74
|
```
|
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.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
|
2
|
+
boto3_refresh_session/session.py,sha256=4AxunP-eQtjyT2NbTnC8elgMDcPlMY55LDrSE1XPKgY,3972
|
3
|
+
boto3_refresh_session-0.0.11.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
4
|
+
boto3_refresh_session-0.0.11.dist-info/METADATA,sha256=wj79tsjK3BcthjKOdlEzNxpF4p0gNoEY_-ZUlp6OCaI,2705
|
5
|
+
boto3_refresh_session-0.0.11.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
6
|
+
boto3_refresh_session-0.0.11.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
|
2
|
-
boto3_refresh_session/session.py,sha256=D-qiFGdy52zzkVnI94Z5hjk3kmb-UkR2fCM77caC3sg,3840
|
3
|
-
boto3_refresh_session-0.0.9.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
4
|
-
boto3_refresh_session-0.0.9.dist-info/METADATA,sha256=o5AsobuyEq5yhb7G_d9jEjViktyporBq5-Zq4ny-WnY,2665
|
5
|
-
boto3_refresh_session-0.0.9.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
6
|
-
boto3_refresh_session-0.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|