config-to-object-1.0.3
توضیحات
A convinient .ini file to NamedTuple parser that supports type hinting
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | config-to-object-1.0.3 |
| نام | config-to-object |
| نسخه کتابخانه | 1.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Yannik Keller |
| ایمیل نویسنده | yannik@kelnet.de |
| آدرس صفحه اصلی | https://github.com/yannikkellerde/config_to_object |
| آدرس اینترنتی | https://pypi.org/project/config-to-object/ |
| مجوز | MIT |
# Convert a .ini config file to a typed Object

## Installation
Install via pip `pip install config-to-object`.
There are no dependencies.
## Usage
Create your `.ini` configuration file. For an example look at [example_config.ini](https://github.com/yannikkellerde/config_to_object/blob/main/example_config.ini?raw=True). You can use any type of native python object such as tuples, lists, strings, floats, integers as parameter values (except dict). There type will be automatically recognized when loading the config file.
Load your configuration file using `from config_to_object import load_config` and `config = load_config("path/to/your/config.ini")`
You can access the values from your `.ini` using `.` syntax: `words = config.Params.words`.
If you want your `config` object to be type hinted, so that your IDE can give you better code completions, run `ini_typefile path/to/your/config.ini config_types.py`. Then, in your code add `from config_types import Config` and initialize your config with `config:Config = load_config("path/to/your/config.ini")`
نحوه نصب
نصب پکیج whl config-to-object-1.0.3:
pip install config-to-object-1.0.3.whl
نصب پکیج tar.gz config-to-object-1.0.3:
pip install config-to-object-1.0.3.tar.gz