bored-config-parser-0.1.1
توضیحات
This is a small module you can use to make using config files easy
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | bored-config-parser-0.1.1 |
| نام | bored-config-parser |
| نسخه کتابخانه | 0.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | tooboredtocode |
| ایمیل نویسنده | bored-coder@tooboredtocode.dev |
| آدرس صفحه اصلی | https://github.com/tooboredtocode/config-parser |
| آدرس اینترنتی | https://pypi.org/project/bored-config-parser/ |
| مجوز | MIT |
# Bored Config Parser
This is a small module you can use to make using config files easy
### Example
A config like this:
```yaml
general:
name: "test"
frequency: 22
targets:
- name: "t1"
size: "2G"
- name: "t2"
size: "1G"
```
can be easily used with the following code:
```python
from typing import List
from config_parser import load_config
class General:
name: str
frequency: int
class Target:
name: str
size: str
@load_config("path/to/config.yaml")
class Config:
general: General
targets: List[Target]
print(Config.general.name)
for target in Config.targets:
print(target.name)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=6.0,<7.0) | PyYAML |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl bored-config-parser-0.1.1:
pip install bored-config-parser-0.1.1.whl
نصب پکیج tar.gz bored-config-parser-0.1.1:
pip install bored-config-parser-0.1.1.tar.gz