Store and Load parameters with AWS Parameter store
Project description
params-aws
Load and Save typed Parameters in AWS Datastore
Install
pip install params-aws
Using the library
Ensure that aws_access_key_id and aws_secret_access_key is properly set in ~/.aws/credentials.
Or any place where boto3 would recognize - https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
Import
from params_aws import params_aws
from params_aws import model
List parameters
>>> params_aws.get_parameter_names()
['test']
Get parameter with type
This will be cached for 12 hour
>>> params_aws.get_parameter('test', model.DBConfig, cached=True)
DBConfig(host='host', user='username', password='password', port=5432, ssl=False)
Put parameter
We should use the cli (see below)
>>> params_aws.put_parameter('test', model.DBConfig, 'value')
CLI
>>> params_aws_cli names
test
test2
>>> params_aws_cli types
DBConfig
GGAPIConfig
>>> params_aws_cli get-value test
{
"host": "host",
"user": "username",
"password": "password",
"port": 5432,
"ssl": false
}
>>> params_aws_cli get test DBConfig
host='host' user='username' password='password' port=5432 ssl=False
>>> params_aws_clit put test DBConfig
(launches an editor which saves and validate on exit)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file params_aws-0.1.2.tar.gz.
File metadata
- Download URL: params_aws-0.1.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a463742ad336ef19671e080f10b9409ebc7a2af6cfc8a9fc707f16daa259dd35
|
|
| MD5 |
1d64f470eee5d4a361395a4d07d5a031
|
|
| BLAKE2b-256 |
af9867b0cd51d96276eec00149a67d33b32baff35a5f3ac6a2d3aa3b44ebb0ee
|
File details
Details for the file params_aws-0.1.2-py3-none-any.whl.
File metadata
- Download URL: params_aws-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a71881475419646d22eb50e185c12f37aac742517ee8dfdaf2313c406890af9d
|
|
| MD5 |
95d4703ae6252b9f830c5648fbbbf5cd
|
|
| BLAKE2b-256 |
a2d22e1369af2995329459c882d4dda21cd80842f86be901f955ae0f7a425a74
|