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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysecrets-0.0.3.tar.gz.
File metadata
- Download URL: pysecrets-0.0.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae1de4d290dce45085df5a11560bb2ef90402cbb955cc1a3ad7840e2861e4f32
|
|
| MD5 |
a14fcecd1c50c03fe8bdc9c4e08f4d9b
|
|
| BLAKE2b-256 |
550e535d0e15c5f90553f7fd2c8f1ca3ddfdcae2ca903fbc05f322cd566fe1e6
|
File details
Details for the file pysecrets-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pysecrets-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2106af35158c318d31f2a8123f7f5479c34bc8e1d4d2e6e757609f73e3f9e13a
|
|
| MD5 |
0d50ca4edc510bd39d2227a53a72379b
|
|
| BLAKE2b-256 |
d12edd9ccb049c609babece0349af5e340c4782b7399987661ad85750b25445b
|