Skip to main content

A simple Configuration System which allows you to import and override or merge configuration parameters

Project description

configcascade
=============

.. image:: https://travis-ci.org/felixcarmona/configcascade.png?branch=master
:target: https://travis-ci.org/felixcarmona/configcascade

.. image:: https://coveralls.io/repos/felixcarmona/configcascade/badge.png?branch=master
:target: https://coveralls.io/r/felixcarmona/configcascade?branch=master

.. image:: https://pypip.in/d/configcascade/badge.png
:target: https://pypi-hypernode.com/pypi/configcascade/
:alt: Downloads

.. image:: https://pypip.in/v/configcascade/badge.png
:target: https://pypi-hypernode.com/pypi/configcascade/
:alt: Latest Version


A simple Configuration System which allows you to import and override or merge configuration parameters

Example
-------

.. code-block:: python
from configcascade import Settings, YamlFileLoader


file_loader = YamlFileLoader()
settings = Settings(file_loader, ['foo']) # the second parameter are a the settings you which you want to merge instead of override when you import
result = settings.compile("file_a.yml")

**file_a.yml:**

.. code-block:: yaml

imports:
- file_b.yml
- file_c.yml

foo:
- x
- y
- z

test:
- a


**file_b.yml:**

.. code-block:: yaml

foo:
- 5
- 7

bbbb: 8

**file_c.yml:**

.. code-block:: yaml

test:
- b

**The generated result will be:**

.. code-block:: yaml

foo:
- x
- y
- z
- 5
- 7

bbbb: 8

test:
- a

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

configcascade-1.0.0.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file configcascade-1.0.0.tar.gz.

File metadata

File hashes

Hashes for configcascade-1.0.0.tar.gz
Algorithm Hash digest
SHA256 39727eb68ead546c9dfe36ad99a4323687be2917bd0252a2b4f75b910a2b9c8d
MD5 3445540f6ff60b5a20e82d2f8be82e9b
BLAKE2b-256 5078662edfeae0238b2411075654510d28b3ee0fdaffdd0eb2a40cd5df44de34

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