Skip to main content

Environment variable manager

Project description

============================================
Knobs (Version 2.0.2 ) are used to tune environment variables
============================================

.. image:: https://badge.fury.io/py/knobs.svg
:target: https://badge.fury.io/py/knobs


.. image:: https://readthedocs.org/projects/knobs/badge/?version=latest
:target: http://knobs.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

|
|

.. image:: https://github.com/sthysel/knobs/blob/master/docs/knob.jpg?raw=true


.. code:: python

>>> 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 <http://www.12factor.net/>`_

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

.. code::

$ pip install knobs

Install from source

.. code::

$ pip install .




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-2.0.2-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: knobs-2.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for knobs-2.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 54f5c4abe9522dd1e64568de9344027f4fa56082aa9df7803b2f13302639d8d4
MD5 1431fde6ba9fcfd653dc01109f5ebbed
BLAKE2b-256 b855b74ec3a0b2126002e53259f0bc965c0b8b22fb67d6fcccbd1386f29a8330

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