Environment variable manager
Project description
============================================
Knobs (Version 2.0.1 ) 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 .
Knobs (Version 2.0.1 ) 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
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 Distribution
knobs-2.0.1.tar.gz
(6.2 kB
view details)
File details
Details for the file knobs-2.0.1.tar.gz
.
File metadata
- Download URL: knobs-2.0.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5792f118393bfd02ecacad485bec2b05a6296d55f83245f868661e4abc433f70 |
|
MD5 | 6c753f47b8c6011c43853707112c5852 |
|
BLAKE2b-256 | 2d05930afdc21ffb582472d18293160af239acd41af6bd857735d293084f9041 |