# easyconfig
![Tests Status](https://github.com/spacemanspiff2007/easyconfig/workflows/Tests/badge.svg)
[![Updates](https://pyup.io/repos/github/spacemanspiff2007/easyconfig/shield.svg)](https://pyup.io/repos/github/spacemanspiff2007/easyconfig/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/easyconfig)
![PyPI](https://img.shields.io/pypi/v/easyconfig)
[![Downloads](https://pepy.tech/badge/easyconfig/month)](https://pepy.tech/project/easyconfig)
_Easy application configuration with yaml files_
## Description
Easyconfig simplifies the configuration management for (small) applications.
Validation and parsing of the configuration file is done through [pydantic](https://pydantic-docs.helpmanual.io/)
and easyconfig builds on that.
It's possible to use all pydantic features and model features so every exotic use case should be covered.
If you have previously worked with pydantic you should feel right at home
## Documentation
[The documentation can be found at here](https://easyconfig.readthedocs.io)
## Features
- Default `.yml` file generation
- Environment variable expansion
- Support for docker secrets
- Callbacks when values of the configuration change
## Why not pydantic settings
A pydantic settings object is a non-mutable object.
With easyconfig you can create a global configuration and just import it into your modules.
When your application starts you can read the configuration e.g. from a settings file and the object values
will change the values accordingly.
Additionally, easyconfig can create a default configuration file with the specified default
values and comments of the pydantic models.
That way the users can have some guidance how to change the program behaviour.
### Expansion
It's possible to use environment variable or files for expansion. Easyconfig will load all values
# Changelog
#### 0.4.0 (2024-01-10)
- Minimum required python version is now 3.10
- Added preprocessor to so it's possible to move and deprecate configuration entries
- Added property to get the loaded configuration file
- Many fixes
- Updated CI and code linters
#### 0.3.2 (2024-01-10)
- Updated CI and code linters
#### 0.3.1 (2023-11-10)
- Updated dependencies and code linters
#### 0.3.0 (2023-03-17)
- Breaking: requires pydantic 2.0
- Added support for variable expansion through environment variables and docker secrets
#### 0.2.8 (2023-02-08)
- Fix for StrictBool
#### 0.2.7 (2023-01-09)
- Fixed default generation for data types that inherit from python base types
#### 0.2.6 (2022-12-21)
- Fixed an issue where the default yaml file would not be created properly when using aliases in container
#### 0.2.5 (2022-10-21)
- Marked package as PEP 561 compatible (py.typed)
#### 0.2.4 (2022-04-19)
- Default values get validated, too
#### 0.2.3 (2022-04-08)
- Added extra kwargs check for pydantic fields
- Added option to get generated yaml as a string
#### 0.2.2 (2022-03-31)
- Added convenience base classes ``AppBaseModel`` and ``BaseModel``
- Works with private attributes and class functions
- Fixed an issue where multiline comments would not be created properly
- Added an option to exclude entries from config file
#### 0.2.1 (2022-03-25)
- Allow callbacks for file defaults
#### 0.2.0 (2022-03-25)
- Switched to new and more flexible API
- File default and config default are now separated
#### 0.1.2 (2022-03-08)
- Comments get nicely intended
- Fixed an issue with nested data structures
- Allow to specify a different value for file creation
#### 0.1.1 (2022-02-26)
- Fixed an issue with dynamic defaults
- Optional values with default None will not be created in the yaml file
#### 0.1.0 (2022-01-10)
- Updated requirements
#### 0.0.2 (2021-09-16)
- Validate user defaults
- Use json representation of values to get native yaml data types
- Use enum values instead of enum types
#### 0.0.1 (2021-09-14)
- Initial release
Raw data
{
"_id": null,
"home_page": "https://github.com/spacemanspiff2007/easyconfig",
"name": "easyconfig",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "yaml, configuration, pydantic, settings, config, yml",
"author": "spaceman_spiff",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/9c/77/beee0e73f2181630425afebd9e2176ffc6ec4739dbe798b335385eb1810f/easyconfig-0.4.0.tar.gz",
"platform": null,
"description": "# easyconfig\n![Tests Status](https://github.com/spacemanspiff2007/easyconfig/workflows/Tests/badge.svg)\n[![Updates](https://pyup.io/repos/github/spacemanspiff2007/easyconfig/shield.svg)](https://pyup.io/repos/github/spacemanspiff2007/easyconfig/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/easyconfig)\n![PyPI](https://img.shields.io/pypi/v/easyconfig)\n[![Downloads](https://pepy.tech/badge/easyconfig/month)](https://pepy.tech/project/easyconfig)\n\n_Easy application configuration with yaml files_\n\n## Description\nEasyconfig simplifies the configuration management for (small) applications.\n\nValidation and parsing of the configuration file is done through [pydantic](https://pydantic-docs.helpmanual.io/)\nand easyconfig builds on that.\nIt's possible to use all pydantic features and model features so every exotic use case should be covered.\nIf you have previously worked with pydantic you should feel right at home\n\n## Documentation\n[The documentation can be found at here](https://easyconfig.readthedocs.io)\n\n## Features\n\n- Default `.yml` file generation\n- Environment variable expansion\n- Support for docker secrets\n- Callbacks when values of the configuration change\n\n## Why not pydantic settings\nA pydantic settings object is a non-mutable object.\nWith easyconfig you can create a global configuration and just import it into your modules.\nWhen your application starts you can read the configuration e.g. from a settings file and the object values\nwill change the values accordingly.\n\nAdditionally, easyconfig can create a default configuration file with the specified default\nvalues and comments of the pydantic models.\nThat way the users can have some guidance how to change the program behaviour.\n\n\n### Expansion\nIt's possible to use environment variable or files for expansion. Easyconfig will load all values\n\n# Changelog\n#### 0.4.0 (2024-01-10)\n- Minimum required python version is now 3.10\n- Added preprocessor to so it's possible to move and deprecate configuration entries\n- Added property to get the loaded configuration file\n- Many fixes\n- Updated CI and code linters\n\n#### 0.3.2 (2024-01-10)\n- Updated CI and code linters\n\n#### 0.3.1 (2023-11-10)\n- Updated dependencies and code linters\n\n#### 0.3.0 (2023-03-17)\n- Breaking: requires pydantic 2.0\n- Added support for variable expansion through environment variables and docker secrets\n\n#### 0.2.8 (2023-02-08)\n- Fix for StrictBool\n\n#### 0.2.7 (2023-01-09)\n- Fixed default generation for data types that inherit from python base types\n\n#### 0.2.6 (2022-12-21)\n- Fixed an issue where the default yaml file would not be created properly when using aliases in container\n\n#### 0.2.5 (2022-10-21)\n- Marked package as PEP 561 compatible (py.typed)\n\n#### 0.2.4 (2022-04-19)\n- Default values get validated, too\n\n#### 0.2.3 (2022-04-08)\n- Added extra kwargs check for pydantic fields\n- Added option to get generated yaml as a string\n\n#### 0.2.2 (2022-03-31)\n- Added convenience base classes ``AppBaseModel`` and ``BaseModel``\n- Works with private attributes and class functions\n- Fixed an issue where multiline comments would not be created properly\n- Added an option to exclude entries from config file\n\n#### 0.2.1 (2022-03-25)\n- Allow callbacks for file defaults\n\n#### 0.2.0 (2022-03-25)\n- Switched to new and more flexible API\n- File default and config default are now separated\n\n#### 0.1.2 (2022-03-08)\n- Comments get nicely intended\n- Fixed an issue with nested data structures\n- Allow to specify a different value for file creation\n\n#### 0.1.1 (2022-02-26)\n- Fixed an issue with dynamic defaults\n- Optional values with default None will not be created in the yaml file\n\n#### 0.1.0 (2022-01-10)\n- Updated requirements\n\n#### 0.0.2 (2021-09-16)\n- Validate user defaults\n- Use json representation of values to get native yaml data types\n- Use enum values instead of enum types\n\n#### 0.0.1 (2021-09-14)\n- Initial release\n",
"bugtrack_url": null,
"license": null,
"summary": "Easy application configuration with yaml files",
"version": "0.4.0",
"project_urls": {
"GitHub": "https://github.com/spacemanspiff2007/easyconfig",
"Homepage": "https://github.com/spacemanspiff2007/easyconfig"
},
"split_keywords": [
"yaml",
" configuration",
" pydantic",
" settings",
" config",
" yml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bdd8ab959076cabb53945fca3c08e639cc238059bb101da87979bb98be492fc7",
"md5": "13a000c3b1bb1dff175685befc9b4776",
"sha256": "af148045876a04d793660559094b9e91bf6aad5161507565bc97252e4f2efa22"
},
"downloads": -1,
"filename": "easyconfig-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "13a000c3b1bb1dff175685befc9b4776",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 28651,
"upload_time": "2024-12-10T11:16:44",
"upload_time_iso_8601": "2024-12-10T11:16:44.115336Z",
"url": "https://files.pythonhosted.org/packages/bd/d8/ab959076cabb53945fca3c08e639cc238059bb101da87979bb98be492fc7/easyconfig-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9c77beee0e73f2181630425afebd9e2176ffc6ec4739dbe798b335385eb1810f",
"md5": "0670f162078e2144664e165ab95ea619",
"sha256": "3869a59fc022f808b89b4695f25580474ab6d880ca4418ea9f14967681a169a7"
},
"downloads": -1,
"filename": "easyconfig-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "0670f162078e2144664e165ab95ea619",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 22629,
"upload_time": "2024-12-10T11:16:46",
"upload_time_iso_8601": "2024-12-10T11:16:46.830466Z",
"url": "https://files.pythonhosted.org/packages/9c/77/beee0e73f2181630425afebd9e2176ffc6ec4739dbe798b335385eb1810f/easyconfig-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-10 11:16:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "spacemanspiff2007",
"github_project": "easyconfig",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "easyconfig"
}