JSON configuration file parser
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
configpy-0.5.tar.gz
(6.1 kB
view details)
File details
Details for the file configpy-0.5.tar.gz.
File metadata
- Download URL: configpy-0.5.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31eb6a19e11453cf367a159b178eb3fabc04be1320eace2ae146b5720eb3404e
|
|
| MD5 |
4c1feec92187ac822806569c9eb2518e
|
|
| BLAKE2b-256 |
ffbe2da8413d7b9cabf59f92e6dec8286a9a3f7d08f3def89f42b4766fddd00c
|