skip to navigation
skip to content

Not Logged In

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
configpy-0.5.tar.gz (md5) Source 2010-06-02 5KB
  • Downloads (All Versions):
  • 40 downloads in the last day
  • 275 downloads in the last week
  • 636 downloads in the last month