Skip to main content

A class allowing you to interact with the AWS Secrets Manager with python dictionary syntax.

Project description

AWS Secrets Dict

aws_secrets_dict is a Dictionary-based class acting as a wrapper for the AWS Secrets Manager. It allows you to Get, Update, & Delete secrets using the notation/syntax of a python dictionary.

Example Usage

from aws_secrets_dict import AwsSecrets

# Need AWS Key & Secret
my_key = "Your AWS Secrets Access Key, or set 'AWS_SECRETS_KEY' env variable"
my_secret = "Your AWS Secrets Secret Key or set 'AWS_SECRETS_SECRET' env variable"
aws_region = "Your AWS Region or set 'AWS_REGION' env variable. If not set/specified, defaults to us-east-2"

mysecrets = AwsSecrets(my_key, my_secret, aws_region)

mysecrets['One'] = 1
mysecrets[2] = "Two"
mysecrets["2"] = 22222
mysecrets['Greeting'] = "Hello"

mysecrets['One']
# 1
mysecrets[2]
# "Two"
mysecrets["2"]
# 22222
mysecrets['Greeting']
# "Hello"

Notes

The class will use the json module to serialize the keys & values, which allows it to distinguish between types when setting keys & retrieving values. Make sure that your keys/values can all be serialized into json.

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_secrets_dict-1.0.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

aws_secrets_dict-1.0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file aws_secrets_dict-1.0.3.tar.gz.

File metadata

  • Download URL: aws_secrets_dict-1.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for aws_secrets_dict-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e7ded5679fc9bd4bc35cf78081c3963b87848f4bbaf7d505d715ca8a371f1077
MD5 68311c04224702b80f987ab3eba32ce3
BLAKE2b-256 3711cd01daddcd190b81be7a8de87efbfad0d67fa760182ea539a59d3b36a500

See more details on using hashes here.

File details

Details for the file aws_secrets_dict-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_secrets_dict-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aa8aeb5afc50a9b372dc54037c573420e133599d6a1d3ac40909eab19cac4e35
MD5 fe35ca42234835d4fc3439e2547f46e8
BLAKE2b-256 30ffa8b387aaa15f5b95b2b5003b15d52f27258fb65b28d220c08e0538a4a4ef

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