Reads credentials from a yaml file
Project description
getsecret
Reads credentials from a file .getsecret.yaml
Install
pip install getsecret
Using
Create a file .getsecret.yaml
. It should be in YAML format. An example follows:
username: foobar
password: supersecret
Now you can access those variables in your code as follows:
from getsecret import getsecret
username = getsecret('username')
password = getsecet('password')
Now the values of username and password are the ones specified in .getsecret.yaml
(foobar and supersecret, respectively).
The file .getsecret.yaml
can be located in the working directory (./.getsecret.yaml
), or at the user's home directory (~/.getsecret.yaml
)
Author
License
MIT
Related
getsecret npm package for javascript on browser/nodejs
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
getsecret-0.0.2.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for getsecret-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37fce045702a3d38f29d738a41bffe3031f39f3b3c7d53020e54b64e862ca2b6 |
|
MD5 | f4200d9317e11b66dd3cb3ee0ac2ce3c |
|
BLAKE2b-256 | 13f61ec268b4535184794de933ad0d5509cc94d4502b9ae7e090f7cff368ec7f |