# pydantic-wrangler
## Description
pydantic-wrangler was born out of the necessity of representing data (originally serialized in YAML files) as python
objects not only capable of exhibiting complex business-logic behaviors, but also ensuring stringent data validation.
As a result, it streamlines the process of parsing data from various serialization formats into Pydantic models, and if
necessary, re-serializing them back into any supported format. In essence, pydantic-wrangler serves as a comprehensive
tool for your data, facilitating a seamless journey from serialization to deserialization (and back, if you so wish).
## Installation
Install it with pip:
```bash
pip install pydantic-wrangler
```
or poetry:
```bash
poetry add pydantic-wrangler
```
## Features
- **Pydantic Integration**: Converting serialized data into Python objects is the oldest trick in the book, but pydantic-wrangler
elevates this process by directly converting the data into Pydantic models, which brings the added advantage of robust
data validation. The models used in this process are defined by classes that inherit from either the
***PydanticWranglerBaseModel*** or ***PydanticWranglerRenderableModel***. This not only provides flexibility in setting up
behaviors for your data, but also ensures data integrity through Pydantic's validation mechanisms.
- **Multiple Formats Support**: Currently, it supports loading serialized data from JSON, YAML, TOML and INI streams/files.
While support for other formats is planned, the package is designed to be easily extensible. Adding your own loader function(s)
to support additional formats (and/or to include use-case specific business-logic) is as simple as defining them in a python module
(.py file) and creating an env var with name 'LOADERS_MODULE' containing the python dotted path to that module.
For more information, please refer to the [Custom Loaders](#custom-loaders) section.
## Table of Contents [pending]
- [Usage](#usage)
- [Base Models](#base-models)
- [Loaders](#custom-loaders)
- [Dumpers](#custom-dumpers)
- [Extensibility](#configs)
- [Example use-case](#example-use-case)
- [Contributing](#contributing)
Raw data
{
"_id": null,
"home_page": "",
"name": "pydantic_wrangler",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "serialization,deserialization,parsing,pydantic-models,seria-to-pydantic,pydantic-to-serial",
"author": "Andr\u00e9 Lima",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/a1/bc/2a0e17abb6c83672d7207e1c80e036b078fc7041a500fff9341be3e9093e/pydantic_wrangler-0.1.0.tar.gz",
"platform": null,
"description": "# pydantic-wrangler\n\n## Description\npydantic-wrangler was born out of the necessity of representing data (originally serialized in YAML files) as python \nobjects not only capable of exhibiting complex business-logic behaviors, but also ensuring stringent data validation.\n\nAs a result, it streamlines the process of parsing data from various serialization formats into Pydantic models, and if \nnecessary, re-serializing them back into any supported format. In essence, pydantic-wrangler serves as a comprehensive \ntool for your data, facilitating a seamless journey from serialization to deserialization (and back, if you so wish).\n\n## Installation\n\nInstall it with pip:\n```bash\npip install pydantic-wrangler\n```\n\nor poetry:\n```bash\npoetry add pydantic-wrangler\n```\n\n\n## Features\n\n- **Pydantic Integration**: Converting serialized data into Python objects is the oldest trick in the book, but pydantic-wrangler \nelevates this process by directly converting the data into Pydantic models, which brings the added advantage of robust \ndata validation. The models used in this process are defined by classes that inherit from either the \n***PydanticWranglerBaseModel*** or ***PydanticWranglerRenderableModel***. This not only provides flexibility in setting up \nbehaviors for your data, but also ensures data integrity through Pydantic's validation mechanisms.\n\n\n- **Multiple Formats Support**: Currently, it supports loading serialized data from JSON, YAML, TOML and INI streams/files.\nWhile support for other formats is planned, the package is designed to be easily extensible. Adding your own loader function(s) \nto support additional formats (and/or to include use-case specific business-logic) is as simple as defining them in a python module \n(.py file) and creating an env var with name 'LOADERS_MODULE' containing the python dotted path to that module. \nFor more information, please refer to the [Custom Loaders](#custom-loaders) section. \n\n## Table of Contents [pending]\n- [Usage](#usage)\n- [Base Models](#base-models)\n- [Loaders](#custom-loaders)\n- [Dumpers](#custom-dumpers)\n- [Extensibility](#configs)\n- [Example use-case](#example-use-case)\n- [Contributing](#contributing)\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package that standardizes data parsing from multiple serilized formats into pydantic models.",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/theandrelima/pydantic-wrangler"
},
"split_keywords": [
"serialization",
"deserialization",
"parsing",
"pydantic-models",
"seria-to-pydantic",
"pydantic-to-serial"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "db1ef326568a96fbbba5ab9f3dbec6aba731d93c4074661eaf44f1daa4f540c4",
"md5": "c0c477800f545a14c6171cd8b5f5579c",
"sha256": "37c78e7aa48e1da6181d8b60264b694a312eab9fe59030522b45f9f032453679"
},
"downloads": -1,
"filename": "pydantic_wrangler-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c0c477800f545a14c6171cd8b5f5579c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 16875,
"upload_time": "2024-02-17T17:51:42",
"upload_time_iso_8601": "2024-02-17T17:51:42.067498Z",
"url": "https://files.pythonhosted.org/packages/db/1e/f326568a96fbbba5ab9f3dbec6aba731d93c4074661eaf44f1daa4f540c4/pydantic_wrangler-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a1bc2a0e17abb6c83672d7207e1c80e036b078fc7041a500fff9341be3e9093e",
"md5": "b812cdd16a066e52a903499e00d28bcd",
"sha256": "c90e29b63bab93cbbd8c578a84db9fd0602ff5812f0135651d039c0ffc1d65d7"
},
"downloads": -1,
"filename": "pydantic_wrangler-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b812cdd16a066e52a903499e00d28bcd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 13821,
"upload_time": "2024-02-17T17:51:43",
"upload_time_iso_8601": "2024-02-17T17:51:43.841522Z",
"url": "https://files.pythonhosted.org/packages/a1/bc/2a0e17abb6c83672d7207e1c80e036b078fc7041a500fff9341be3e9093e/pydantic_wrangler-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-17 17:51:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "theandrelima",
"github_project": "pydantic-wrangler",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pydantic_wrangler"
}