# boto3-refresh-session
[![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)
[![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)
![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)
## Overview
A simple Python package for refreshing boto3 sessions automatically.
## Features
- `boto3_refresh_session.AutoRefreshableSession` method for generating an automatically refreshing `boto3.Session` object.
## Installation
To install the package using `pip`:
```bash
$ pip install boto3-refresh-session
```
**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!**
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.
## Directory
```
boto3_refresh_session
├── __init__.py
└── session.py
```
## Usage
Here's how to initialize the `boto3.Client.S3` object:
```python
from boto3_refresh_session import AutoRefreshableSession
session = AutoRefreshableSession(
region="us-east-1", role_arn="<your-arn>", session_name="test"
)
s3_client = session.session.client(service_name="s3")
```
## Contributing
Refer to [this document](https://github.com/michaelthomasletts/boto3-refresh-session/blob/main/docs/contributing.md) for step by step instructions.
Raw data
{
"_id": null,
"home_page": "https://github.com/michaelthomasletts/boto3-refresh-session",
"name": "boto3-refresh-session",
"maintainer": "Michael Letts",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "lettsmt@gmail.com",
"keywords": "boto3, botocore, aws",
"author": "Mike Letts",
"author_email": "michaelthomasletts@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/48/5b/844ef0e6dd97855d4ed7ef20ce4cde74e611ebbba60eb37880d680796fd0/boto3_refresh_session-0.0.10.tar.gz",
"platform": null,
"description": "# boto3-refresh-session\n[![PyPI Download](https://img.shields.io/pypi/v/boto3-refresh-session?logo=pypis.svg)](https://pypi.org/project/boto3-refresh-session/)\n[![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)\n![Python Version](https://img.shields.io/pypi/pyversions/boto3-refresh-session?style=pypi)\n\n## Overview\n\nA simple Python package for refreshing boto3 sessions automatically.\n\n## Features\n- `boto3_refresh_session.AutoRefreshableSession` method for generating an automatically refreshing `boto3.Session` object.\n\n## Installation\n\nTo install the package using `pip`:\n\n```bash\n$ pip install boto3-refresh-session\n```\n\n**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!** \n\nRefer 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.\n\n## Directory\n\n```\nboto3_refresh_session\n\u251c\u2500\u2500 __init__.py\n\u2514\u2500\u2500 session.py\n```\n\n## Usage\n\nHere's how to initialize the `boto3.Client.S3` object:\n\n```python\nfrom boto3_refresh_session import AutoRefreshableSession\n\n\nsession = AutoRefreshableSession(\n region=\"us-east-1\", role_arn=\"<your-arn>\", session_name=\"test\"\n)\ns3_client = session.session.client(service_name=\"s3\")\n```\n\n## Contributing\n\nRefer to [this document](https://github.com/michaelthomasletts/boto3-refresh-session/blob/main/docs/contributing.md) for step by step instructions.",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple Python package for refreshing boto3 sessions automatically.",
"version": "0.0.10",
"project_urls": {
"Homepage": "https://github.com/michaelthomasletts/boto3-refresh-session",
"Repository": "https://github.com/michaelthomasletts/boto3-refresh-session"
},
"split_keywords": [
"boto3",
" botocore",
" aws"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a3f5e4f8d87fe616d3364869559329c204f24c33c79fa6a6962a9556938d7fd9",
"md5": "80bdde7d4407c38992158cb4acbb9b0d",
"sha256": "d2e46a4e6eef53d924320c886439d89e9e06fade9833cf02a9b8d0ba7914b261"
},
"downloads": -1,
"filename": "boto3_refresh_session-0.0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "80bdde7d4407c38992158cb4acbb9b0d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 4511,
"upload_time": "2025-01-14T09:19:39",
"upload_time_iso_8601": "2025-01-14T09:19:39.319227Z",
"url": "https://files.pythonhosted.org/packages/a3/f5/e4f8d87fe616d3364869559329c204f24c33c79fa6a6962a9556938d7fd9/boto3_refresh_session-0.0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "485b844ef0e6dd97855d4ed7ef20ce4cde74e611ebbba60eb37880d680796fd0",
"md5": "01033a086d3137a3befc740b52781fd5",
"sha256": "4aae449523ba4519a6877652c69c9a8571310b649ffbecf6116fcaaed6173140"
},
"downloads": -1,
"filename": "boto3_refresh_session-0.0.10.tar.gz",
"has_sig": false,
"md5_digest": "01033a086d3137a3befc740b52781fd5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 3570,
"upload_time": "2025-01-14T09:19:41",
"upload_time_iso_8601": "2025-01-14T09:19:41.556759Z",
"url": "https://files.pythonhosted.org/packages/48/5b/844ef0e6dd97855d4ed7ef20ce4cde74e611ebbba60eb37880d680796fd0/boto3_refresh_session-0.0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-14 09:19:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "michaelthomasletts",
"github_project": "boto3-refresh-session",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "boto3-refresh-session"
}