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.1.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for getsecret-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e22523b1ed3e458706569bc9f7df6a8d69c2cbac00c70544fc1f971c3b1b7bac |
|
MD5 | 62794a03630be77a5c38f2cd1a688e40 |
|
BLAKE2b-256 | 53b3856f13dce7a013eef5dd46790c3995a95790b75da9c2823b2f604be45e18 |