What Does It Do?
The CFG configuration format is a text format for configuration files which is similar
to, and a superset of, the JSON format.It has the following aims:
* Allow a hierarchical configuration scheme with support for key-value mappings and
* Support cross-references between one part of the configuration and another.
* Provide a string interpolation facility to easily build up configuration values from
other configuration values.
* Provide the ability to compose configurations (using include and merge facilities).
* Provide the ability to access real application objects safely.
* Be completely declarative.
It overcomes a number of drawbacks of JSON when used as a configuration format:
* JSON is more verbose than necessary.
* JSON doesn’t allow comments.
* JSON doesn’t provide first-class support for dates and multi-line strings.
* JSON doesn’t allow trailing commas in lists and mappings.
* JSON doesn’t provide easy cross-referencing, interpolation, or composition.
The Python config module provides an interface to work with configuration files written
in the CFG format.
Comprehensive documentation is available at
and you can report issues / enhancement requests at
As always, your feedback is most welcome (especially bug reports, patches and
suggestions for improvement). Enjoy!