Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datawookie/secrets-manager
https://github.com/datawookie/secrets-manager
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/datawookie/secrets-manager
- Owner: datawookie
- Created: 2023-08-21T04:30:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-12T07:10:47.000Z (about 1 year ago)
- Last Synced: 2024-11-12T04:02:47.522Z (2 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## AWS Secrets Manager Python client
The Secrets Manager Python client enables retrieving of secrets for Python applications.
## Getting Started
### Usage
1. Set up the following environment variables:
```bash
export AWS_PROFILE=
export AWS_DEFAULT_REGION=
# The name of the secret in Secrets Manager.
export AWS_SECRET_ID=
```2. Retrieve values for specific keys.
```python
from secrets_manager import *# Get secrets from AWS and fallback to environment variable if not found.
secret = get_secret(name='www', key='API_KEY').or_default(name='API_KEY', source='env')# Get specific key from a JSON decoded secret
secret = get_secret(name='api', key='DB_PASSWORD')get_secret(name='api', key='DB_PASSWORD').get()
describe_secret("api")
get_secret_value("api")
get_secret_dict("api")
get_secret_key("api", "DB_HOST")
```## Development
### Versions
Update the version. Something like:
```
bump2version patch
```Push changes.
Push new tags.
```
git push origin --tags
```