Environment variable manager
Project description
Use knobs if you worship at the church of the 12 Factor App
A knob is a wrapper for an environment variable. It can * Read and write an environment variable * Make sure it is of the expected type * Validate a value is good.
>>> pirates = Knob('JOLLY_ROGER_PIRATES', 124, description='Yar')
>>> pirates.get()
124
>>> pirates.get_type
knobs will search for a nominated environmental file (default .env) and load that into the environment. A knob is type aware, configured from the environment and its value can be persisted to ease the creation of configuration files.
Knobs uses a forked copy of python-sotenv
Install
Install from pypi
$ pip install knobs
Install from source
$ pip install .
Versioning
Current version is 0.2.3
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 Distributions
Built Distribution
File details
Details for the file knobs-0.2.3-py2-none-any.whl
.
File metadata
- Download URL: knobs-0.2.3-py2-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ad44958a090bcccdefd285abb874aad5196cec3700c52926d8e6b5efcd7439 |
|
MD5 | b376900c153aabf6ade183a68a4d0ae1 |
|
BLAKE2b-256 | 2732724d474719e8f985cfdc531d5e52fa5d902b9cecc12d26ee9ac3f48c8ea6 |