Environment variable manager
Project description
>>> pirates = Knob('JOLLY_ROGER_PIRATES', 124, description='Yar')
>>> pirates.get()
124
>>> pirates.get_type()
>>> <type 'int'>
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.
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.
Install
Install from pypi
$ pip install knobs
Install from source
$ pip install .
Versioning
Current version is 0.2.7
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 Distributions
File details
Details for the file knobs-0.2.7-py2.py3-none-any.whl
.
File metadata
- Download URL: knobs-0.2.7-py2.py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d166f2198a62d25d5df3a3b880f83db6b03111e183c8fcfe1be2ad637ed5d6b3 |
|
MD5 | 0c101990ebad49d3b0ca247781aa1ccd |
|
BLAKE2b-256 | feba6690b52a982f916bbb3f0b347bcd331c01504166af2e021c1fbbdeb1753a |
File details
Details for the file knobs-0.2.7-py2-none-any.whl
.
File metadata
- Download URL: knobs-0.2.7-py2-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 359cebf2b98cf9c4f9a1679cc1f7bcac60835bb3168af65c4392338b7b80fbdd |
|
MD5 | c67dff2e30a776a3aa7e4384566e4264 |
|
BLAKE2b-256 | 345751ac2fe6c9ebec474d31dd163ea056aa828b666f655fd857f290beb6bf3f |