Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python API providing a set of classes as basis for configuration objects with multiple values per attribute.

Project Description

What

Multiconf is a framework for describing complex configuration for multiple environments using Python.

Why?

It started from a simple need of deployment automation for Java EE projects, Apache and more. Having worked on different projects with plain text property files or XML configuration files, I thought something better was needed. With plain text property files, the number of property files increases as projects and environments are added, and number of scripts increases too. It gets hard to get an overview of properties describing similar configurations. Has a property value been defined for all projects for every environment? And it is getting even harder to describe proper settings: what depends on what and what can be used and what can’t. With XML you keep having to extend the schema and the tool processing it. So why use XML or property files when you can have your configuration directly in python? So, out of this Multiconf was born.

What are proper settings?

  • All configured ports follow one convention
  • All servers names follow one convention
  • Some configuration objects must have mandatory parameters (for example: Database name or URL required for Datasource object)
  • Some configuration objects must have mandatory children (for example: WebLogic Cluster doesn’t make sense w/o Managed Servers)
  • Default settings are propagated through all environments and can be overridden for specific environments
  • No duplicated settings

How

Imagine that you have a project, where you are going to use Jboss and WebLogic. You are going to use database connections. And a project will typically have at least four environments: DevLocal (for developer’s local machine), Dev (integration), Test and Prod, sometimes many more. The project configuration will be similar on different environments, but something will be different (databases, host names, number of hosts, number of WebLogic/Jboss servers, and ports, for example).

What Multiconf is

Multiconf provides a set of classes, where attributes may have different values for different environments, while enforcing that a value is defined for all defined environments. Multiconf allows you to implement your own DOM like object model and get early warning that something within your definition is wrong. Other tools use YAML or JSON to define settings of the components, but then you need something to validate those settings. Multiconf is both - definition and validation. Multiconf allows you to define environment groups, so that you can easily create new environments by adding them to a group and only override the values that differ from the group values.

What Multiconf is not

  • Multiconf itself doesn’t know how to create environments.
  • Multiconf is not tied to configuration of any particular product or technology.
  • Multiconf doesn’t know how to create any of the environment’s components
  • Multiconf has nothing to execute

Running the demo:

Execute ./demo/demo.py –env (or ‘python demo/demo.py …’), e.g:

./demo/demo.py –env prod

If run without args it will print a usage message The valide environments are those specified at the top of demo/config.py

Running the test suite:

Execute: make, py.test or tox Running ‘make’ will execute the test suite, the demo and build the documentation.

Requirements

Multiconf: Python 2.7.3+, Python 3.5+ Test Suite: pytest, pytest-cov, demjson (optional) - pip install -U pytest pytest-cov demjson

Release History

Release History

This version
History Node

6.2.0

History Node

6.1.2

History Node

6.1.1

History Node

5.0.3

History Node

4.4.6

History Node

4.4.5

History Node

4.4.4

History Node

4.4.3

History Node

4.2.2

History Node

4.2.1

History Node

4.2.0

History Node

4.1.0

History Node

4.0.1

History Node

4.0.0

History Node

3.3.5

History Node

3.3.4

History Node

3.3.3

History Node

3.3.2

History Node

3.3.1

History Node

3.3

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
multiconf-6.2.0.tar.gz (95.1 kB) Copy SHA256 Checksum SHA256 Source Jul 30, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting