Skip to main content

AWS Extensions for Python Decouple

Project description

AWS Extensions for Python Decouple

Installation

pip install python-decouple-aws

Usage

# Import
from decouple import Config
from decouple_aws import get_config, RepositoryAwsSecretManager

# The package provides a wrapper function that will
# fallback to environment variables and fail gracefully
# if AWS Secrets Manager is not accessible for whatever
# reason.
config = get_config('your/secret/name', 'ap-southeast-2')

# Alternatively, if you would like it to fail if secrets
# manager is inaccessible, you can build it manually.
# initialise the config with the AWS repository
# Pass the repo your secret name and the region
repo = RepositoryAwsSecretManager('your/secret/name', 'ap-southeast-2')
config = Config(repo)

# Use decouple config like normal
MY_SUPER_SECRET_SETTING = config('MY_SUPER_SECRET_SETTING')

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

python-decouple-aws-0.2.3.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

python_decouple_aws-0.2.3-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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