cnfrm-0.2.5
توضیحات
CnfRM - ORM for config
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cnfrm-0.2.5 |
| نام | cnfrm |
| نسخه کتابخانه | 0.2.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | hiaselhans |
| ایمیل نویسنده | simon.klemenc@gmail.com |
| آدرس صفحه اصلی | https://github.com/hiaselhans/CnfRM |
| آدرس اینترنتی | https://pypi.org/project/cnfrm/ |
| مجوز | - |
# CnfRM
**Imagine: an ORM for config**
This library lets you declare your config in a way you might know from
popular ORM's.
You get
* expressive configuration declaration
* popular fileformats (json, yml?)
* command line options
* env configuration variables
```python
import cnfrm
class MyConf(cnfrm.Config):
name = cnfrm.Field("no name")
size = cnfrm.IntegerField(required=False)
path = cnfrm.DirectoryField(required=False)
email = cnfrm.EmailField(required=False)
filename = cnfrm.FileField()
# create a config instance
config = MyConf()
# start reading things, the later overwrites the former
config.read_env()
config.read_json("~/myconf.json", quiet=True)
config.read_args()
# check if the configuration is complete
config.validate()
# write config to file:
config.write_json("~/myconf.json")
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl cnfrm-0.2.5:
pip install cnfrm-0.2.5.whl
نصب پکیج tar.gz cnfrm-0.2.5:
pip install cnfrm-0.2.5.tar.gz