Metadata-Version: 2.1
Name: python-decouple-aws
Version: 0.2.3
Summary: AWS Extensions for Python Decouple
Home-page: https://github.com/AzMoo/python-decouple-aws
License: MIT
Author: Matt Magin
Author-email: matt.magin@cmv.com.au
Requires-Python: >=3.4,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: boto3 (>=1.7,<2.0)
Requires-Dist: python-decouple (>=3.1,<4.0)
Description-Content-Type: text/x-rst

Python Decouple AWS
===================

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')

