ezkfg-0.1.1


توضیحات

Easy Configuration
ویژگی مقدار
سیستم عامل -
نام فایل ezkfg-0.1.1
نام ezkfg
نسخه کتابخانه 0.1.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Bingjie Yan
ایمیل نویسنده bj.yan.pa@qq.com
آدرس صفحه اصلی http://github.com/beiyuouo/ezkfg
آدرس اینترنتی https://pypi.org/project/ezkfg/
مجوز Apache-2.0 License
# ezkfg Easy Configuration ## Installation ```bash pip install ezkfg ``` ## Usage ### Basic Usage ```python import ezkfg as ez from ezkfg import Config if __name__ == '__main__': config = Config({"a": 1, "b": {"c": 2}, "z.y.x": 233}) # or ez.load("xxx") assert config.a == 1 assert config.b.c == 2 assert config.z.y.x == 233 config.a = 3 assert config.a == 3 config["d.e.f"] = 3 assert config["d.e.f"] == 3 assert config.d.e.f == 3 config["e.f.g.h"] = 4 assert config.e.f.g.h == 4 assert config["e.f.g.h"] == 4 config.e["h.i.j"] = 5 assert config.e["h.i.j"] == 5 assert config.e.h.i.j == 5 assert config["e.h.i.j"] == 5 config["g.h.i.j"] = 7 assert config.g.h.i.j == 7 assert config["g.h.i.j"] == 7 config.load(["--model=resnet18", "--batch-size=32", "--lr=0.01"]) assert config.model == "resnet18" assert config.batch_size == "32" assert config.lr == "0.01" config.dump('config.json') # support json, yaml, py, ini config.load('config.json') ``` You can find more examples in [tests](https://github.com/beiyuouo/ezkfg/tree/main/tests). ### Advanced Usage ```python ``` ## Acknowledgements This project is inspired by the [addict](https://github.com/mewwts/addict), [CHANfiG](https://github.com/ZhiyuanChen/CHANfiG) and [mmdetection](https://github.com/open-mmlab/mmdetection).


نیازمندی

مقدار نام
- PyYAML


زبان مورد نیاز

مقدار نام
>=3.6 Python


نحوه نصب


نصب پکیج whl ezkfg-0.1.1:

    pip install ezkfg-0.1.1.whl


نصب پکیج tar.gz ezkfg-0.1.1:

    pip install ezkfg-0.1.1.tar.gz