Skip to main content

Environment variable manager

Project description

https://badge.fury.io/py/knobs.svg Documentation Status


https://github.com/sthysel/knobs/blob/master/docs/knob.jpg?raw=true
>>> 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.10

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

knobs-0.2.10-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file knobs-0.2.10-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for knobs-0.2.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1c2a7e7a9eb7de78c0a64a867e5c8d9625f23dc1a3e08abb269cd2c2ccc6f035
MD5 fb3c4e9b815617b8fba6c8e1624133b7
BLAKE2b-256 addc22514709708bcb25832487230427302cbaef4d5a98248543927076ab670b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page