Skip to main content

Provides functions to get up-to-date AWS regions lists.

Project description

Continuous testing & Linting

Overview

This package provides a very simple API for retrieving the most up-to-date region list. The region info is pulled from the botocore Github project so this requires a network connection. The advantage to using botocore directly is that the region list is not reliant on the botocore version which is installed. This can be an issue if you are using system packages for example, which may get updates very infrequently and thus may be missing new regions.

Requirements

  • requests

Installation

pip install aws-regions

Usage

There are two main functions in aws-regions. The first function will provide a list of regions based on the AWS partition. By default this is this public AWS partition:

from aws_regions.endpoints import get_regions


# Defaults to "aws" partition
regions = get_regions()

# "aws-cn" partition
cn_region = get_regions(partition='aws-cn')

The second function will return a list of all regions from all three partitions:

from aws_regions.endpoints import get_all_regions

all_regions = get_all_regions()  # From aws, aws-cn and aws-us-gov

Issues/Enhancements

Please submit issues and requests to Github.

Contributing

Contributions to aws-regions are welcome and encouraged. See CONTRIBUTING for info on getting started.

License

Copyright (c) 2021 SUSE LLC.

Distributed under the terms of MIT license, see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_regions-0.3.0.tar.gz (52.4 kB view details)

Uploaded Source

Built Distribution

aws_regions-0.3.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file aws_regions-0.3.0.tar.gz.

File metadata

  • Download URL: aws_regions-0.3.0.tar.gz
  • Upload date:
  • Size: 52.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for aws_regions-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c15cd40ee8009e1c25e10df691fa97079ba71f29b760f13442423a8b1d3f64ef
MD5 f8a506bc4b81e1df405e48391fbbff4c
BLAKE2b-256 649d6bce303ca5cd8e4c68fd5221ca2b29f1621aa363d8dd792b042dbe4d847f

See more details on using hashes here.

File details

Details for the file aws_regions-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: aws_regions-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for aws_regions-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99c564dab1e72f4b49b3aaedee2bb720fe13eeadaed83fcc992e85dbb453104a
MD5 866b672e58849919543fed3aeaa7cca8
BLAKE2b-256 2765db73d1a7f6ab49b0337df5c0e765c43ebc396a8a8621450b7378367e3f24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page