boto3-refresh-session 0.0.10__tar.gz → 0.0.12__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.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,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,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
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "0.0.10"
3
+ version = "0.0.12"
4
4
  description = "A simple Python package for refreshing boto3 sessions automatically."
5
5
  authors = [
6
6
  {name = "Mike Letts",email = "michaelthomasletts@gmail.com"}
@@ -16,6 +16,7 @@ maintainers = [
16
16
 
17
17
  [project.urls]
18
18
  repository = "https://github.com/michaelthomasletts/boto3-refresh-session"
19
+ documentation = "https://michaelthomasletts.github.io/boto3-refresh-session/index.html"
19
20
 
20
21
  [build-system]
21
22
  requires = ["poetry-core>=2.0.0,<3.0.0"]
@@ -27,6 +28,9 @@ black = "^24.10.0"
27
28
  isort = "^5.13.2"
28
29
  flake8 = "^7.1.1"
29
30
  pre-commit = "^4.0.1"
31
+ sphinx = "^8.1.3"
32
+ pydata-sphinx-theme = "^0.16.1"
33
+ numpydoc = "^1.8.0"
30
34
 
31
35
  [tool.black]
32
36
  line-length = 79
@@ -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
- ## Features
11
- - `boto3_refresh_session.AutoRefreshableSession` method for generating an automatically refreshing `boto3.Session` object.
12
-
13
- ## Installation
14
-
15
- To install the package using `pip`:
16
-
17
- ```bash
18
- $ pip install boto3-refresh-session
19
- ```
20
-
21
- **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!**
22
-
23
- 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.
24
-
25
- ## Directory
26
-
27
- ```
28
- boto3_refresh_session
29
- ├── __init__.py
30
- └── session.py
31
- ```
32
-
33
- ## Usage
34
-
35
- Here's how to initialize the `boto3.Client.S3` object:
36
-
37
- ```python
38
- from boto3_refresh_session import AutoRefreshableSession
39
-
40
-
41
- session = AutoRefreshableSession(
42
- region="us-east-1", role_arn="<your-arn>", session_name="test"
43
- )
44
- s3_client = session.session.client(service_name="s3")
45
- ```
46
-
47
- ## Contributing
48
-
49
- Refer to [this document](https://github.com/michaelthomasletts/boto3-refresh-session/blob/main/docs/contributing.md) for step by step instructions.