Name | echostream-botocore JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Provides a botocore.session.Session implementation for accessing EchoStream Tenant resources |
upload_time | 2024-07-18 00:18:35 |
maintainer | None |
docs_url | None |
author | EchoStream |
requires_python | >=3.12 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# echostream-botocore
Provides a `botocore.session.Session` implementation for accessing EchoStream Tenant resources
This package provides two primary mechanisms to create a `botocore.session.Session` object in your EchoStream Tenant; `ApiSession` or `AppSession`. These session objects will automatically refresh both your Cognito credentials and your botocore credentials (using the EchoStream AppSync API).
> Note: Version >= 0.1.0 requires Python 3.12
## Installation
```bash
pip install echostream-botocore
```
## Common parameters
| Parameter | ENV VAR | Description | Required |
| - | - | - | - |
| `appsync_endpoint` | `APPSYNC_ENDPOINT` | The EchoStream AppSync endpoint | If `cognito` not provided |
| `client_id` | `CLIENT_ID` | The Cognito Client Id for the provided `user_pool_id` | If `cognito` not provided |
| `cognito` | N/A | A [`pycognito.Cognito`]((https://github.com/pvizeli/pycognito#cognito-utility-class)) object | If other parameters are not provided |
| `duration` | N/A | The length of time that the underlying credentials should be good for in seconds; shoudl be greater than `900` | Defaults to `3600` |
| `password` | `PASSWORD` | The password associated with `username` | If `cognito` not provided |
| `tenant` | `TENANT` | The name of the EchoStream Tenant | Yes |
| `user_pool_id` | `USER_POOL_ID` | The Cognito User Pool Id | If `cognito` not provided |
| `username` | `USER_NAME` | The username of the `ApiUser` | If `cognito` not provided |
## ApiSession
`ApiSession` objects are used to gain a Tenant-level `botocore.session.Session` in your Tenant using an EchoStream `ApiUser`.
`ApiSession`s may be created using a [`pycognito.Cognito`](https://github.com/pvizeli/pycognito#cognito-utility-class) instance or via a combination of environment variables and parameters. The environment variables or parameters are interchangeable. All parameters/environment variables are required if a `Cognito` object is not provided. If a `Cognito` object is provided, then all parameters/environment varaiables are ignored and it is assumed that the `Cognito` object references an `ApiUser`.
### Usage (assuming correct ENV setup)
```python
from boto3 import Session
from echostream_botocore import ApiSession
session = Session(
botocore_session=ApiSession(),
region_name="us-east-1"
)
ddb_client = session.client("dynamodb")
...
```
## AppSession
`AppSession` objects are used to gain a App-level `botocore.session.Session` in your Tenant using an EchoStream `AppUser`.
`AppSession`s may be created using a [`pycognito.Cognito`](https://github.com/pvizeli/pycognito#cognito-utility-class) instance or via a combination of environment variables and parameters. The environment variables or parameters are interchangeable. All parameters/environment variables are required if a `Cognito` object is not provided. If a `Cognito` object is provided, then all parameters/environment varaiables are ignored and it is assumed that the `Cognito` object references an `AppUser`.
### Additional Parameters
| Parameter | ENV VAR | Description | Required |
| - | - | - | - |
| `app` | `APP` | The name of the EchoStream App | Yes |
### Usage (assuming correct ENV setup)
```python
from boto3 import Session
from echostream_botocore import AppSession
session = Session(
botocore_session=AppSession(),
region_name="us-east-1"
)
ddb_client = session.client("dynamodb")
...
```
Raw data
{
"_id": null,
"home_page": null,
"name": "echostream-botocore",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": null,
"author": "EchoStream",
"author_email": "pypi@echo.stream",
"download_url": "https://files.pythonhosted.org/packages/24/c4/bcc8c43426badea6e70d800f8f94ad1a30660fcae45783a782d8fc9c215d/echostream_botocore-0.1.0.tar.gz",
"platform": null,
"description": "# echostream-botocore\n\nProvides a `botocore.session.Session` implementation for accessing EchoStream Tenant resources\n\nThis package provides two primary mechanisms to create a `botocore.session.Session` object in your EchoStream Tenant; `ApiSession` or `AppSession`. These session objects will automatically refresh both your Cognito credentials and your botocore credentials (using the EchoStream AppSync API).\n\n> Note: Version >= 0.1.0 requires Python 3.12\n\n## Installation\n```bash\npip install echostream-botocore\n```\n\n## Common parameters\n| Parameter | ENV VAR | Description | Required |\n| - | - | - | - |\n| `appsync_endpoint` | `APPSYNC_ENDPOINT` | The EchoStream AppSync endpoint | If `cognito` not provided |\n| `client_id` | `CLIENT_ID` | The Cognito Client Id for the provided `user_pool_id` | If `cognito` not provided |\n| `cognito` | N/A | A [`pycognito.Cognito`]((https://github.com/pvizeli/pycognito#cognito-utility-class)) object | If other parameters are not provided |\n| `duration` | N/A | The length of time that the underlying credentials should be good for in seconds; shoudl be greater than `900` | Defaults to `3600` |\n| `password` | `PASSWORD` | The password associated with `username` | If `cognito` not provided |\n| `tenant` | `TENANT` | The name of the EchoStream Tenant | Yes |\n| `user_pool_id` | `USER_POOL_ID` | The Cognito User Pool Id | If `cognito` not provided |\n| `username` | `USER_NAME` | The username of the `ApiUser` | If `cognito` not provided |\n\n\n## ApiSession\n`ApiSession` objects are used to gain a Tenant-level `botocore.session.Session` in your Tenant using an EchoStream `ApiUser`.\n\n`ApiSession`s may be created using a [`pycognito.Cognito`](https://github.com/pvizeli/pycognito#cognito-utility-class) instance or via a combination of environment variables and parameters. The environment variables or parameters are interchangeable. All parameters/environment variables are required if a `Cognito` object is not provided. If a `Cognito` object is provided, then all parameters/environment varaiables are ignored and it is assumed that the `Cognito` object references an `ApiUser`.\n\n### Usage (assuming correct ENV setup)\n```python\nfrom boto3 import Session\nfrom echostream_botocore import ApiSession\n\nsession = Session(\n botocore_session=ApiSession(),\n region_name=\"us-east-1\"\n)\n\nddb_client = session.client(\"dynamodb\")\n...\n```\n\n## AppSession\n`AppSession` objects are used to gain a App-level `botocore.session.Session` in your Tenant using an EchoStream `AppUser`.\n\n`AppSession`s may be created using a [`pycognito.Cognito`](https://github.com/pvizeli/pycognito#cognito-utility-class) instance or via a combination of environment variables and parameters. The environment variables or parameters are interchangeable. All parameters/environment variables are required if a `Cognito` object is not provided. If a `Cognito` object is provided, then all parameters/environment varaiables are ignored and it is assumed that the `Cognito` object references an `AppUser`.\n\n### Additional Parameters\n| Parameter | ENV VAR | Description | Required |\n| - | - | - | - |\n| `app` | `APP` | The name of the EchoStream App | Yes |\n\n### Usage (assuming correct ENV setup)\n```python\nfrom boto3 import Session\nfrom echostream_botocore import AppSession\n\nsession = Session(\n botocore_session=AppSession(),\n region_name=\"us-east-1\"\n)\n\nddb_client = session.client(\"dynamodb\")\n...\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Provides a botocore.session.Session implementation for accessing EchoStream Tenant resources",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1c65ea014cb84820764445a45af27c78bba9c4e6c014f465c28c24f02fa45736",
"md5": "7fd696531bc8772f4ea3d9f7a5f9cee5",
"sha256": "0d3e43afa71a048e9d1d12612a3ba3e8111ebb808afad45c853c0851f47a636f"
},
"downloads": -1,
"filename": "echostream_botocore-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7fd696531bc8772f4ea3d9f7a5f9cee5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 7994,
"upload_time": "2024-07-18T00:18:34",
"upload_time_iso_8601": "2024-07-18T00:18:34.109973Z",
"url": "https://files.pythonhosted.org/packages/1c/65/ea014cb84820764445a45af27c78bba9c4e6c014f465c28c24f02fa45736/echostream_botocore-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "24c4bcc8c43426badea6e70d800f8f94ad1a30660fcae45783a782d8fc9c215d",
"md5": "53ebf93cc3696f7448106acdd2d07130",
"sha256": "46b96cc940138d91d627ae18aa05ba4a1a6a8e55a9d132553f5fcc2294020b4e"
},
"downloads": -1,
"filename": "echostream_botocore-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "53ebf93cc3696f7448106acdd2d07130",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 7584,
"upload_time": "2024-07-18T00:18:35",
"upload_time_iso_8601": "2024-07-18T00:18:35.373967Z",
"url": "https://files.pythonhosted.org/packages/24/c4/bcc8c43426badea6e70d800f8f94ad1a30660fcae45783a782d8fc9c215d/echostream_botocore-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-18 00:18:35",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "echostream-botocore"
}