ConfigJ-1.0.0
توضیحات
A json base config lib.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ConfigJ-1.0.0 |
| نام | ConfigJ |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | DancingSnow |
| ایمیل نویسنده | 1121149616@qq.com |
| آدرس صفحه اصلی | https://github.com/DancingSnow0517/ConfigJ |
| آدرس اینترنتی | https://pypi.org/project/ConfigJ/ |
| مجوز | - |
# ConfigJ
A json base config lib.
## Usage
```python
from configj import ConfigJ, AbstractConfig
class ConfigData(AbstractConfig):
config1: str = 'Default Value'
config2: int = 166
cj = ConfigJ('config.json', ConfigData)
# Type hint
config: ConfigData
# when file not exists, create default config file and return it.
config = cj.load()
print(config.config1) # Default Value
config.config2 = 1 # set value
cj.save(config) # save config to file
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl ConfigJ-1.0.0:
pip install ConfigJ-1.0.0.whl
نصب پکیج tar.gz ConfigJ-1.0.0:
pip install ConfigJ-1.0.0.tar.gz