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.3.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for getsecret-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d15adaead278169d98568a1c5f97181c0c1649c46a5c3479b73d5babb78226e4 |
|
MD5 | 05f882f24a511c474c011811cdf6816c |
|
BLAKE2b-256 | a88d249948059a98ba1f0439c8ed7fd89db33370feca40b95c342688b76e9eaa |