Skip to main content

Simplify use of AWS resources in your code with aws-python-utils

Project description

aws-python-utils

Simplify use of AWS resources in your code with aws-python-utils

AwsSecretManager

get_secret()

Use ENVIRONMENT variable "AWS_SECRET_MANAGER_SECRET" or pass in secret_key name.

Example Usage

Via ENVIRONMENT variable

In [1]: import os
In [2]: import secretmanager
In [3]: os.environ["AWS_SECRET_MANAGER_SECRET"] = "mysecret"
In [4]: secretmanager = secretmanager.AwsSecretManager()
In [5]: secretmanager.get_secret()
Out[5]: 'supersecretpass'

Or pass in secret_key name ..

In [1]: import os
In [2]: import secretmanager
In [3]: secretmanager = secretmanager.AwsSecretManager()
In [4]: secretmanager.get_secret(secret_key="mysecret")
Out[4]: 'supersecretpass'

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-python-utils-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file aws-python-utils-0.0.1.tar.gz.

File metadata

File hashes

Hashes for aws-python-utils-0.0.1.tar.gz
Algorithm Hash digest
SHA256 446128484e706194d688781f959164c5c65f1fbf41dbb6831d23d1fcbc2fadf6
MD5 1e4d7d9d354592557b391946859fa611
BLAKE2b-256 f1f83544d861fc559ee813e5dbb44d09aa007780dfbf3fb01c2a52aca261b197

See more details on using hashes here.

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