configpy 0.5
JSON configuration file parser
configpy is a JSON configuration file reader with support for variable look-ahead and look-behind, expressions, and comments.
Example
config_json = """
/* Some example configuration items */
{
"a": 10,
"b": 2,
"c": "{{ ${a} / ${b} }}",
"d": "{{ ${c} * ${a} }}",
"e": "{{ ${d} + 50 }}",
"f": "{{ ${e} - 25 }}",
"g": "'some text = {{ ${a} / ${b} }}'"
}
"""
config = Config(config_json)
10 == config.a
2 == config.b
5 == config.c
50 == config.d
100 == config.e
75 == config.f
"some text = 5" == config.g
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| configpy-0.5.tar.gz (md5) | Source | 2010-06-02 | 5KB | 433 | |
- Author: John Keyes
- Home Page: http://jkeyes.github.com/configpy/
- License: BSD
- Categories
- Package Index Owner: jkeyes
- DOAP record: configpy-0.5.xml
