The lightest weight package for loading secrets into a project
Project description
PySecrets
The lightest weight package for loading secrets into a project via the os.environ
.
Setup
Easy install via pip
pip install pysecrets
The package requires you to have a file in your project directory that is called .secrets
. This file will look like the following:
# passwords file
PASSWORD=hello
APIKEY=17886cd8-6d61-4c29-9482-c64fb995ea14
# comments must be on their own lines
Example Usage
This is for your basic usage with a .secrets
file.
import os
from pysecrets import secrets
secrets()
print(os.environ['PASSWORD'])
If you have secrets for a different environment, simply
...
secrets('.secrets_stage')
...
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
pysecrets-0.0.2.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for pysecrets-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c181ea66db270554fa32011b57485e9014438fbf1fbc733385d430f534bfce6 |
|
MD5 | 32dbd9865898f3c11c3549a0c812f91f |
|
BLAKE2b-256 | df0274fd38debe425bda7985a95a031b450ca7a5cf49dcfcadf393946650fe85 |