configpy-0.5
توضیحات
JSON configuration file parser
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | configpy-0.5 |
| نام | configpy |
| نسخه کتابخانه | 0.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | John Keyes |
| ایمیل نویسنده | john@keyes.ie |
| آدرس صفحه اصلی | http://jkeyes.github.com/configpy/ |
| آدرس اینترنتی | https://pypi.org/project/configpy/ |
| مجوز | BSD |
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
نحوه نصب
نصب پکیج whl configpy-0.5:
pip install configpy-0.5.whl
نصب پکیج tar.gz configpy-0.5:
pip install configpy-0.5.tar.gz