New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-regions

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-regions

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

  • 0.2.0
  • PyPI
  • Socket score

Maintainers
1

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc