JackSON
Have you ever used JSON as your config? Have you keep secrets in config as plain text, that you dont want to? Then this is the right tool for you.
JackSON is the simple and flexible file extension of JSON file types written in python (in less than 50 lines of code), this extension allows the users to keep their secrets in environment variables and pass the reference to those environment variables into the JSON file(jackson). The secrets in the environment variables will be read securely in to the in memory dict.
The problem that it solves:
- Retrive secrest from env variables.
- Retrive secrets from remote/servers(HSMs).
How to JackSON
JackSON is exported as python package. You can install it via pip.
pip install --user jackson
export foo=10
export bar=100
Example JackSON config file.
{
"_comment1": "Value from foo env variable",
"key1": "env.foo",
"_comment2": "Value from bar env variable",
"key2": "env.bar",
"_comment3": "Value from python module",
"key3": "!a.b",
"_comment4": "key/value pair similar to json",
"key4": "value4"
}
Inside the code.
import jackson
import json # For converting JackSON --> JSON
d = json.load(jackson.File.open("./config.jackson"))
print(d)
And this is how it looks.
{
"key4": "value4",
"key3": "reached",
"key2": "100",
"key1": "10",
"_comment4": "key/value pair similar to json",
"_comment3": "Value from python module",
"_comment2": "Value from bar env variable",
"_comment1": "Value from foo env variable"
}
Metadata
Release files for JackSON 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| JackSON-0.1.4.tar.gz | 3.5 kB | Without provenance | Details |
Release files / JackSON-0.1.4.tar.gz
| Download URL | JackSON-0.1.4.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69e01d2946e58a917d7d9ebbcc1941eab128d75a776d5086dd880c40e1da9fdd
|
|
BLAKE2b-256 checksum How to use checksums |
a8e0271c236fd9a8157ccdbf1aa0e628e36041e7ca17bb319e19b010723749e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for JackSON 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.