Skip to main content

Knobs (Version 2.1.1 ) are used to tune environment variables

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 .

Metadata

Release files for knobs 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for knobs 2.1.1
File Interpreter ABI Platform
knobs-2.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / knobs-2.1.1-py2.py3-none-any.whl

Download URL knobs-2.1.1-py2.py3-none-any.whl
Size 7.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
61c5157304780acc2b4f5b2f704332f488176757c863a278d671d0b8619106b1
BLAKE2b-256 checksum
How to use checksums
4b7617a052ccb96c784b4cd05761c342e271087d5c16b46afc565af944102318
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

2.1.1 This release

1 release file

2.1.0

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.0

1 release file

0.2.16

1 release file

0.2.15

1 release file

0.2.14

1 release file

0.2.13

1 release file

0.2.12

1 release file

0.2.11

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

2 release files

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page