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.3.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for pysecrets-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2106af35158c318d31f2a8123f7f5479c34bc8e1d4d2e6e757609f73e3f9e13a |
|
MD5 | 0d50ca4edc510bd39d2227a53a72379b |
|
BLAKE2b-256 | d12edd9ccb049c609babece0349af5e340c4782b7399987661ad85750b25445b |