<!-- markdownlint-disable -->
<p align="center">
<a href="https://github.com/AWSToolbox/">
<img src="https://cdn.wolfsoftware.com/assets/images/github/organisations/awstoolbox/black-and-white-circle-256.png" alt="AWSToolbox logo" />
</a>
<br />
<a href="https://github.com/AWSToolbox/get-aws-regions-package/actions/workflows/cicd.yml">
<img src="https://img.shields.io/github/actions/workflow/status/AWSToolbox/get-aws-regions-package/cicd.yml?branch=master&label=build%20status&style=for-the-badge" alt="Github Build Status" />
</a>
<a href="https://github.com/AWSToolbox/get-aws-regions-package/blob/master/LICENSE.md">
<img src="https://img.shields.io/github/license/AWSToolbox/get-aws-regions-package?color=blue&label=License&style=for-the-badge" alt="License">
</a>
<a href="https://github.com/AWSToolbox/get-aws-regions-package">
<img src="https://img.shields.io/github/created-at/AWSToolbox/get-aws-regions-package?color=blue&label=Created&style=for-the-badge" alt="Created">
</a>
<br />
<a href="https://github.com/AWSToolbox/get-aws-regions-package/releases/latest">
<img src="https://img.shields.io/github/v/release/AWSToolbox/get-aws-regions-package?color=blue&label=Latest%20Release&style=for-the-badge" alt="Release">
</a>
<a href="https://github.com/AWSToolbox/get-aws-regions-package/releases/latest">
<img src="https://img.shields.io/github/release-date/AWSToolbox/get-aws-regions-package?color=blue&label=Released&style=for-the-badge" alt="Released">
</a>
<a href="https://github.com/AWSToolbox/get-aws-regions-package/releases/latest">
<img src="https://img.shields.io/github/commits-since/AWSToolbox/get-aws-regions-package/latest.svg?color=blue&style=for-the-badge" alt="Commits since release">
</a>
<br />
<a href="https://github.com/AWSToolbox/get-aws-regions-package/blob/master/.github/CODE_OF_CONDUCT.md">
<img src="https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge" />
</a>
<a href="https://github.com/AWSToolbox/get-aws-regions-package/blob/master/.github/CONTRIBUTING.md">
<img src="https://img.shields.io/badge/Contributing-blue?style=for-the-badge" />
</a>
<a href="https://github.com/AWSToolbox/get-aws-regions-package/blob/master/.github/SECURITY.md">
<img src="https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge" />
</a>
<a href="https://github.com/AWSToolbox/get-aws-regions-package/issues">
<img src="https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge" />
</a>
</p>
## Overview
This module provides a simple method for retrieving and processing AWS region information. This is a core component
for all of the tools in our [AWS Toolbox](https://github.com/AWSToolbox).
### Features
- **Fetching AWS Regions**:
- Retrieve a list of all AWS regions, optionally including/excluding regions based on account opt-in status.
- Supports fetching detailed information about each region.
- **Region Details**:
- Fetch geographical location descriptions for specific AWS regions from the AWS Systems Manager (SSM) Parameter Store.
- Utilizes concurrent threading for enhanced performance when fetching multiple region details.
- **Filtering**:
- Apply include and exclude filters to customize the list of AWS regions returned.
### Functions
#### Public Functions
- **get_region_list**
- Retrieves a list of AWS regions.
- Parameters:
- `include_list`: Optional list of regions to include.
- `exclude_list`: Optional list of regions to exclude.
- `all_regions`: Boolean flag to include all regions (default: True).
- `details`: Boolean flag to return detailed information about each region (default: False).
- Returns:
- If `details=True`: Sorted list of dictionaries containing detailed region information.
- If `details=False`: Sorted list of region names as strings.
- Raises:
- `RegionListingError`: If an error occurs during region retrieval or processing.
### Usage
This module is designed to be used as part of the `wolfsoftware.get-aws-regions` package. The primary function, `get_region_list`, allows flexible retrieval and customization of AWS region information based on user-defined criteria.
### Example
```python
from wolfsoftware.get_aws_regions import get_region_list
# Example usage: Retrieve all regions and print their names
regions = get_region_list(details=False)
print("AWS Regions:", regions)
# Example usage: Retrieve detailed information for selected regions
detailed_regions = get_region_list(include_list=['us-west-1', 'us-east-1'], details=True)
for region in detailed_regions:
print(f"Region: {region['RegionName']}, Location: {region['GeographicalLocation']}")
```
### Notes
- Ensure AWS credentials are properly configured for API access.
- Error handling is integrated to manage exceptions during AWS operations.
- Threading is utilized for efficient concurrent operations when fetching region details.
For further details and customization options, refer to the function docstrings and the module's implementation.
<br />
<p align="right"><a href="https://wolfsoftware.com/"><img src="https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge" /></a></p>
Raw data
{
"_id": null,
"home_page": "https://github.com/AWSToolbox/get-aws-regions-package",
"name": "wolfsoftware.get-aws-regions",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "python, aws, regions",
"author": "Wolf Software",
"author_email": "pypi@wolfsoftware.com",
"download_url": "https://files.pythonhosted.org/packages/54/0b/5b8c7157cba23730863597017cb6f639725c432389169b9872bd88ef90a0/wolfsoftware_get_aws_regions-0.1.0.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable -->\n<p align=\"center\">\n <a href=\"https://github.com/AWSToolbox/\">\n <img src=\"https://cdn.wolfsoftware.com/assets/images/github/organisations/awstoolbox/black-and-white-circle-256.png\" alt=\"AWSToolbox logo\" />\n </a>\n <br />\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/actions/workflows/cicd.yml\">\n <img src=\"https://img.shields.io/github/actions/workflow/status/AWSToolbox/get-aws-regions-package/cicd.yml?branch=master&label=build%20status&style=for-the-badge\" alt=\"Github Build Status\" />\n </a>\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/blob/master/LICENSE.md\">\n <img src=\"https://img.shields.io/github/license/AWSToolbox/get-aws-regions-package?color=blue&label=License&style=for-the-badge\" alt=\"License\">\n </a>\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package\">\n <img src=\"https://img.shields.io/github/created-at/AWSToolbox/get-aws-regions-package?color=blue&label=Created&style=for-the-badge\" alt=\"Created\">\n </a>\n <br />\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/releases/latest\">\n <img src=\"https://img.shields.io/github/v/release/AWSToolbox/get-aws-regions-package?color=blue&label=Latest%20Release&style=for-the-badge\" alt=\"Release\">\n </a>\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/releases/latest\">\n <img src=\"https://img.shields.io/github/release-date/AWSToolbox/get-aws-regions-package?color=blue&label=Released&style=for-the-badge\" alt=\"Released\">\n </a>\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/releases/latest\">\n <img src=\"https://img.shields.io/github/commits-since/AWSToolbox/get-aws-regions-package/latest.svg?color=blue&style=for-the-badge\" alt=\"Commits since release\">\n </a>\n <br />\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/blob/master/.github/CODE_OF_CONDUCT.md\">\n <img src=\"https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge\" />\n </a>\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/blob/master/.github/CONTRIBUTING.md\">\n <img src=\"https://img.shields.io/badge/Contributing-blue?style=for-the-badge\" />\n </a>\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/blob/master/.github/SECURITY.md\">\n <img src=\"https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge\" />\n </a>\n <a href=\"https://github.com/AWSToolbox/get-aws-regions-package/issues\">\n <img src=\"https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge\" />\n </a>\n</p>\n\n## Overview\n\nThis module provides a simple method for retrieving and processing AWS region information. This is a core component\nfor all of the tools in our [AWS Toolbox](https://github.com/AWSToolbox).\n\n### Features\n\n- **Fetching AWS Regions**:\n - Retrieve a list of all AWS regions, optionally including/excluding regions based on account opt-in status.\n - Supports fetching detailed information about each region.\n\n- **Region Details**:\n - Fetch geographical location descriptions for specific AWS regions from the AWS Systems Manager (SSM) Parameter Store.\n - Utilizes concurrent threading for enhanced performance when fetching multiple region details.\n\n- **Filtering**:\n - Apply include and exclude filters to customize the list of AWS regions returned.\n\n### Functions\n\n#### Public Functions\n\n- **get_region_list**\n - Retrieves a list of AWS regions.\n - Parameters:\n - `include_list`: Optional list of regions to include.\n - `exclude_list`: Optional list of regions to exclude.\n - `all_regions`: Boolean flag to include all regions (default: True).\n - `details`: Boolean flag to return detailed information about each region (default: False).\n - Returns:\n - If `details=True`: Sorted list of dictionaries containing detailed region information.\n - If `details=False`: Sorted list of region names as strings.\n - Raises:\n - `RegionListingError`: If an error occurs during region retrieval or processing.\n\n### Usage\n\nThis module is designed to be used as part of the `wolfsoftware.get-aws-regions` package. The primary function, `get_region_list`, allows flexible retrieval and customization of AWS region information based on user-defined criteria.\n\n### Example\n\n```python\nfrom wolfsoftware.get_aws_regions import get_region_list\n\n# Example usage: Retrieve all regions and print their names\nregions = get_region_list(details=False)\nprint(\"AWS Regions:\", regions)\n\n# Example usage: Retrieve detailed information for selected regions\ndetailed_regions = get_region_list(include_list=['us-west-1', 'us-east-1'], details=True)\nfor region in detailed_regions:\n print(f\"Region: {region['RegionName']}, Location: {region['GeographicalLocation']}\")\n```\n\n### Notes\n\n- Ensure AWS credentials are properly configured for API access.\n- Error handling is integrated to manage exceptions during AWS operations.\n- Threading is utilized for efficient concurrent operations when fetching region details.\n\nFor further details and customization options, refer to the function docstrings and the module's implementation.\n\n<br />\n<p align=\"right\"><a href=\"https://wolfsoftware.com/\"><img src=\"https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge\" /></a></p>\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple package for retrieving a list of AWS regions.",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/AWSToolbox/get-aws-regions-package",
"Homepage": "https://github.com/AWSToolbox/get-aws-regions-package",
"Source": "https://github.com/AWSToolbox/get-aws-regions-package",
"Sponsor": "https://github.com/sponsors/WolfSoftware",
"Tracker": "https://github.com/AWSToolbox/get-aws-regions-package/issues/"
},
"split_keywords": [
"python",
" aws",
" regions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6e9da259a233506929a4f01952988dcd6edea9913bdd034eaf00b596f762519a",
"md5": "d354ae664b4fe1647a0d755db55aa6eb",
"sha256": "8f4aec54f5df25f5d1e1f2d277c9dcb32aa6bb0145e7bad1b5987e4501d4f508"
},
"downloads": -1,
"filename": "wolfsoftware.get_aws_regions-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d354ae664b4fe1647a0d755db55aa6eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 7549,
"upload_time": "2024-06-27T12:25:29",
"upload_time_iso_8601": "2024-06-27T12:25:29.189061Z",
"url": "https://files.pythonhosted.org/packages/6e/9d/a259a233506929a4f01952988dcd6edea9913bdd034eaf00b596f762519a/wolfsoftware.get_aws_regions-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "540b5b8c7157cba23730863597017cb6f639725c432389169b9872bd88ef90a0",
"md5": "f8d400b89b94dec9efd23bbf5b61d221",
"sha256": "93a3547cb5defc8aabff40f3cf855fc4b39e81b383ea75b0aa40b084e8df56b4"
},
"downloads": -1,
"filename": "wolfsoftware_get_aws_regions-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "f8d400b89b94dec9efd23bbf5b61d221",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 9445,
"upload_time": "2024-06-27T12:25:31",
"upload_time_iso_8601": "2024-06-27T12:25:31.301661Z",
"url": "https://files.pythonhosted.org/packages/54/0b/5b8c7157cba23730863597017cb6f639725c432389169b9872bd88ef90a0/wolfsoftware_get_aws_regions-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-27 12:25:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AWSToolbox",
"github_project": "get-aws-regions-package",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "wolfsoftware.get-aws-regions"
}