application-settings-0.2.0
توضیحات
For providing a python application with configuration and/or settings
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | application-settings-0.2.0 |
| نام | application-settings |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Stockwatchdevs |
| ایمیل نویسنده | stockwatchdevs@gmail.com |
| آدرس صفحه اصلی | https://github.com/StockwatchDev/application_settings |
| آدرس اینترنتی | https://pypi.org/project/application-settings/ |
| مجوز | MIT |
# application_settings
[](https://pypi.python.org/pypi/application-settings)
[](https://github.com/StockwatchDev/application_settings)
[](https://github.com/StockwatchDev/application_settings/actions)
[](https://app.codecov.io/gh/StockwatchDev/application_settings)
[](http://mypy-lang.org/)
[](https://github.com/PyCQA/pylint)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](https://opensource.org/licenses/MIT)
"You write the dataclasses to define parameters for configuration and settings,
application\_settings takes care of the logic."
## What and why
Application\_settings is a package for providing a python application with parameters for
configuration and settings. It uses [toml](https://toml.io/en/) or
[json](https://www.json.org/) files that are parsed
into dataclasses. This brings some benefits:
- Minimal work for the application designer
- Parameters are typed, which allows for improved static code analyses.
- IDEs will provide helpful hints and completion when using the parameters.
- More control over what happens when a file contains mistakes
(by leveraging the power of [pydantic](https://docs.pydantic.dev/)).
- Possibility to specify defaults when no file is found or entries are missing.
- Configuration parameters are read-only (i.e., changed by editing the config file); we
recommend (and support) the use of `toml` for this, which is a human-oriented,
flexible, standardardized and not overly complex format.
- Settings parameters are read-write (i.e., mostly changed via the UI of the
application); we recommend (and support) use `json` for this, an established
standardized machine-oriented format.
Parsing is done once during first access and the resulting set of parameters is stored
as a singleton.
Interested? Then have a look at our
[quick start](https://stockwatchdev.github.io/application_settings/0.2.0/docs/Quick_start/).
[//]: # (Change link to published quick start)
## License
This project is licensed under the terms of the MIT license.
نیازمندی
| مقدار | نام |
|---|---|
| >=2.5,<3.0 | pathvalidate |
| >=1.10,<2.0 | pydantic |
| >=2.0,<3.0 | tomli |
| >=1.0,<2.0 | tomli-w |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl application-settings-0.2.0:
pip install application-settings-0.2.0.whl
نصب پکیج tar.gz application-settings-0.2.0:
pip install application-settings-0.2.0.tar.gz