Skip to main content

Configuration manager

Project description

kaptan
======

|pypi| |docs| |build-status| |coverage| |license|

configuration parser.

installation
------------

.. code-block:: console

You can't use 'macro parameter character #' in math mode echo "environment: DEV" > config.yaml
kaptanconfig.yamlexportjson>config.json cat config.json
{"environment": "DEV"}

getting a value

.. code-block:: console

kaptanconfig.yamlkeyenvironmentDEVspecifyingthehandler..codeblock::console mv config.yaml config.settings
kaptanconfig.settings:yamlexportjson"environment":"DEV"configfromstdin..codeblock::console echo '{"source": "stdin"}' | kaptan -
{"source": "stdin"}
echosource:stdin|kaptan:yaml"source":"stdin"mergingconfigs..codeblock::console echo "environment: PROD" > config.settings
echo"source":"stdin"|kaptanconfig.jsonconfig.settings:yaml"environment":"PROD","source":"stdin"settingdefaulthandler..codeblock::console echo "source: stdin" | kaptan --handler yaml - config.settings
{"environment": "PROD", "source": "stdin"}

writing json with yaml

.. code-block:: console

kaptan:yamlejson<typeyamlhere><Ctrl+D><getjsonhere>runningtestswithpy.test:..codeblock::console py.test

contributors
------------

- `Cenk Altı <http://github.com/cenkalti>`_
- `Wesley Bitter <http://github.com/Wessie>`_
- `Mark Steve <http://github.com/marksteve>`_
- `Tony Narlock <http://github.com/tony>`_
- `Berker Peksag <http://github.com/berkerpeksag>`_
- `Pradyun S. Gedam <https://github.com/pradyunsg>`_

see more at https://github.com/emre/kaptan/graphs/contributors.

.. |pypi| image:: https://img.shields.io/pypi/v/kaptan.svg
:alt: Python Package
:target: http://badge.fury.io/py/kaptan

.. |build-status| image:: https://img.shields.io/travis/emre/kaptan.svg
:alt: Build Status
:target: https://travis-ci.org/emre/kaptan

.. |coverage| image:: https://codecov.io/gh/emre/kaptan/branch/master/graph/badge.svg
:alt: Code Coverage
:target: https://codecov.io/gh/emre/kaptan

.. |license| image:: https://img.shields.io/github/license/emre/kaptan.svg
:alt: License

.. |docs| image:: https://readthedocs.org/projects/kaptan/badge/?version=latest
:alt: Documentation Status
:scale: 100%
:target: https://readthedocs.org/projects/kaptan/

Supported by

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