Overview

clearconf

A simple and human-readable configuration / data storage format, presently used by the Leebre project's in .sbstyle template files. Similar to ini-style configuration but with HEREDOC style multiline fields.

The format looks like this:

[entry]
name = alice

[entry]
# A comment!
name = bob
age = 42
bio : EOF
many 
lines of stuff
EOF

[anotherthing]
fields can have spaces = see?
bio : EOFA
lets have
EOF
by itself
EOFA

It provides two functions, clearconf.loads and clearconf.dumps.

Loads will load a string, returning a dictionary. An optional index_by will add a new "index", so things like:

[Entry]
id=123
name=test123

with index_by="id" will get you {'id': { 123: {'name': 'test123', 'id': '123'} ...} ...}

Author

made by michaelb for use on the Leebre project