FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

knobs/docs at master · sthysel/knobs · GitHub

/ knobs Public

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.rst

Knobs (Version 2.0.1 ) are used to tune environment variables



>>> 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 .

Back | FazBrowse Home | New Git URL