Secret Manager AWS
Project description
secret-manager
Secret manager for Python
How to use
Add dependency -
secrets-manager==0.0.2
Set environment variable -
APP_ENV = prod/staging
APP_NAME = IAMservice
In config file:
from secretmanager import secrets
redshift_secrets = secrets['redshift']
REDSHIFT_HOST = redshift_secrets['host']
REDSHIFT_PORT = redshift_secrets['port']
REDSHIFT_USER = redshift_secrets['username']
REDSHIFT_PASS = redshift_secrets['password']
REDSHIFT_DB = redshift_secrets['dbname']
Secret manager changes -
Secret format is -
APP_NAME + "_" + APP_ENV + "_" + SECRET_NAME
Go to secret manager and add secret name in above defined format eg(IAMservice_prod_redshift)
Add key value pair inside as -
host = <redshift_host>
port = <redshift_host>
SECRET_NAME will be used to access secret in your code.
In above example SECRET_NAME = redshift
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for secret_manager-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1dda220304255119d978f1d1334aba21cd1b8ee907119ac71753d4dbc6bcc7b |
|
MD5 | 09594b87c44d119198e94cf831ed644f |
|
BLAKE2b-256 | 2dcd9f64f12f5aa81fe244b0e48ca000bf6228e66d052909f6b6e7bb70902e85 |