boto3-refresh-session 0.0.11__tar.gz → 0.0.13__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 0.0.11
3
+ Version: 0.0.13
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
@@ -32,43 +32,6 @@ Description-Content-Type: text/markdown
32
32
 
33
33
  A simple Python package for refreshing boto3 sessions automatically.
34
34
 
35
- ## Links
35
+ ## Usage and Installation
36
36
 
37
37
  [Official Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
38
-
39
- ## Features
40
- - `boto3_refresh_session.AutoRefreshableSession` method for generating an automatically refreshing `boto3.Session` object.
41
-
42
- ## Installation
43
-
44
- To install the package using `pip`:
45
-
46
- ```bash
47
- $ pip install boto3-refresh-session
48
- ```
49
-
50
- **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!**
51
-
52
- 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.
53
-
54
- ## Directory
55
-
56
- ```
57
- boto3_refresh_session
58
- ├── __init__.py
59
- └── session.py
60
- ```
61
-
62
- ## Usage
63
-
64
- Here's how to initialize the `boto3.Client.S3` object:
65
-
66
- ```python
67
- from boto3_refresh_session import AutoRefreshableSession
68
-
69
-
70
- session = AutoRefreshableSession(
71
- region="us-east-1", role_arn="<your-arn>", session_name="test"
72
- )
73
- s3_client = session.session.client(service_name="s3")
74
- ```
@@ -0,0 +1,12 @@
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)
@@ -1,17 +1,9 @@
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
-
13
1
  from __future__ import annotations
14
2
 
3
+ __doc__ = """
4
+ Helper method for generating an automatically refreshing ``boto3.Session``
5
+ object.
6
+ """
15
7
  __all__ = ["AutoRefreshableSession"]
16
8
 
17
9
  from typing import Type
@@ -25,14 +17,14 @@ from botocore.session import get_session
25
17
 
26
18
  @define
27
19
  class AutoRefreshableSession:
28
- """Returns a boto3 Session object which refreshes automatically, no extra
20
+ """Returns a ``boto3.Session`` object which refreshes automatically, no extra
29
21
  steps required.
30
22
 
31
23
  This object is useful for long-running processes where temporary credentials
32
24
  may expire between iterations.
33
25
 
34
- To use this class, you must have `~/.aws/config` or `~/.aws/credentials`
35
- on your machine.
26
+ To use this class, you must have ``~/.aws/config`` or ``~/.aws/credentials``
27
+ configured on your machine.
36
28
 
37
29
  Parameters
38
30
  ----------
@@ -45,14 +37,14 @@ class AutoRefreshableSession:
45
37
  ttl : int, optional
46
38
  Number of seconds until temporary credentials expire, default 900.
47
39
  session_kwargs : dict, optional
48
- Optional keyword arguments for `boto3.Session`.
40
+ Optional keyword arguments for ``boto3.Session``.
49
41
  client_kwargs : dict, optional
50
- Optional keyword arguments for `boto3.Session.client`.
42
+ Optional keyword arguments for ``boto3.Session.client``.
51
43
 
52
44
  Attributes
53
45
  ----------
54
46
  session
55
- Returns a boto3 Session object with credentials which refresh
47
+ Returns a ``boto3.Session`` object with credentials which refresh
56
48
  automatically.
57
49
 
58
50
  Notes
@@ -61,13 +53,13 @@ class AutoRefreshableSession:
61
53
 
62
54
  https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
63
55
 
64
- This class assumes that `~/.aws` exists with `/config` or `/credentials`!
56
+ This class assumes that ``~/.aws`` exists with ``/config`` or ``/credentials``!
65
57
 
66
58
  Examples
67
59
  --------
68
- Here's how to initialize the `boto3.Client.S3` object:
60
+ Here's how to initialize the ``boto3.Client.S3`` object:
69
61
 
70
- >>> session = AutoRefreshableSession(
62
+ >>> sess = AutoRefreshableSession(
71
63
  >>> region="us-east-1",
72
64
  >>> role_arn="<your-arn>",
73
65
  >>> session_name="test",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "0.0.11"
3
+ version = "0.0.13"
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,49 +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
- ## Links
11
-
12
- [Official Documentation](https://michaelthomasletts.github.io/boto3-refresh-session/index.html)
13
-
14
- ## Features
15
- - `boto3_refresh_session.AutoRefreshableSession` method for generating an automatically refreshing `boto3.Session` object.
16
-
17
- ## Installation
18
-
19
- To install the package using `pip`:
20
-
21
- ```bash
22
- $ pip install boto3-refresh-session
23
- ```
24
-
25
- **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!**
26
-
27
- 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.
28
-
29
- ## Directory
30
-
31
- ```
32
- boto3_refresh_session
33
- ├── __init__.py
34
- └── session.py
35
- ```
36
-
37
- ## Usage
38
-
39
- Here's how to initialize the `boto3.Client.S3` object:
40
-
41
- ```python
42
- from boto3_refresh_session import AutoRefreshableSession
43
-
44
-
45
- session = AutoRefreshableSession(
46
- region="us-east-1", role_arn="<your-arn>", session_name="test"
47
- )
48
- s3_client = session.session.client(service_name="s3")
49
- ```