pydantic_serdes


Namepydantic_serdes JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA Python package that standardizes data serialization and deserialization from/to pydantic models.
upload_time2024-06-22 00:13:11
maintainerNone
docs_urlNone
authorAndré Lima
requires_python<4.0,>=3.9
licenseMIT
keywords serialization deserialization parsing pydantic-models serialized-to-pydantic pydantic-to-serialized
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pydantic-serdes

pydantic-serdes is a Pydantic-based tool designed to act as a conduit between serialized data and Python objects. It 
not only facilitates the transformation of complex serialized data into Python objects, but also ensures stringent
data validation. Think of it as the wizard that transports your data from the realm of serialization into the world
of Python, and vice-versa, all the while maintaining the integrity and structure of your data. 

> *DISCLAMER*:
> Please note that this package was previously named `serial_bus` until version 0.2.0. To improve communication and 
> disambiguation, it has been renamed to `pydantic-serdes`. 


## Install

pip:

```bash
pip install pydantic-serdes
```

poetry:

```bash
poetry add pydantic-serdes
```

## Features

- **Pydantic Integration**: Converting serialized data into Python objects is the oldest trick in the book, but 
  pydantic-serdes elevates this process by directly converting the data into Pydantic models (and vice-versa), which 
  brings the added advantage of robust data validation. The models used in this process are defined by classes that 
  inherit from either the ***PydanticSerdesBaseModel*** or ***PydanticSerdesRenderableModel***. This not only 
  provides flexibility in setting up behaviors for your data, but also ensures data integrity through Pydantic's 
  validation mechanisms.


- **Built-in Support for Multiple Formats**: Currently, it supports loading serialized data from JSON, YAML, TOML 
  and INI. While future support for other formats is planned, if you need to cover additional formats, or even 
  provide your own parsing business logic, this can be easily achieved by extending pydantic-serdes basic 
  coverage with your own loader and/or dumper functions. Speaking of which...


- **Extensibility**: The code was thought to allow for ease of extensibility. For more information and examples, refer
to the documentation below.


<p align="center">
  <img src="https://github.com/theandrelima/pydantic-serdes/blob/main/docs/images/pydantic-serdes.png" alt="pydantic-serdes" width="300"/>
</p>


## Quick Start
  - [Usage examples](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#usage):
    - [Example 1: Instantiating models from serialized data](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#example-1-instantiating-models-from-serialized-data)
    - [Example 2: Data Relationship & Model Rendering](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#example-2-data-relationship--model-rendering)
    - [Example 3: Converting data between supported formats](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#example-3-converting-data-between-supported-formats)
  - [Configuration & Extensibility](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/configuration-and-extensibility.md)
- [pydantic-serdes Base Models](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/base_models.md)
- [The GLOBAL_DATA_STORE](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/the_global_data_store.md)
- [Loaders](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/loaders.md)
- [Dumpers](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/dumpers.md)
- [Contributing](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/contributing.md)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pydantic_serdes",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "serialization, deserialization, parsing, pydantic-models, serialized-to-pydantic, pydantic-to-serialized",
    "author": "Andr\u00e9 Lima",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/d3/61/0d8dd428598be9214fd051411cdaa39abfda870cb8a999b01c09f7319989/pydantic_serdes-1.0.0.tar.gz",
    "platform": null,
    "description": "# pydantic-serdes\n\npydantic-serdes is a Pydantic-based tool designed to act as a conduit between serialized data and Python objects. It \nnot only facilitates the transformation of complex serialized data into Python objects, but also ensures stringent\ndata validation. Think of it as the wizard that transports your data from the realm of serialization into the world\nof Python, and vice-versa, all the while maintaining the integrity and structure of your data. \n\n> *DISCLAMER*:\n> Please note that this package was previously named `serial_bus` until version 0.2.0. To improve communication and \n> disambiguation, it has been renamed to `pydantic-serdes`. \n\n\n## Install\n\npip:\n\n```bash\npip install pydantic-serdes\n```\n\npoetry:\n\n```bash\npoetry add pydantic-serdes\n```\n\n## Features\n\n- **Pydantic Integration**: Converting serialized data into Python objects is the oldest trick in the book, but \n  pydantic-serdes elevates this process by directly converting the data into Pydantic models (and vice-versa), which \n  brings the added advantage of robust data validation. The models used in this process are defined by classes that \n  inherit from either the ***PydanticSerdesBaseModel*** or ***PydanticSerdesRenderableModel***. This not only \n  provides flexibility in setting up behaviors for your data, but also ensures data integrity through Pydantic's \n  validation mechanisms.\n\n\n- **Built-in Support for Multiple Formats**: Currently, it supports loading serialized data from JSON, YAML, TOML \n  and INI. While future support for other formats is planned, if you need to cover additional formats, or even \n  provide your own parsing business logic, this can be easily achieved by extending pydantic-serdes basic \n  coverage with your own loader and/or dumper functions. Speaking of which...\n\n\n- **Extensibility**: The code was thought to allow for ease of extensibility. For more information and examples, refer\nto the documentation below.\n\n\n<p align=\"center\">\n  <img src=\"https://github.com/theandrelima/pydantic-serdes/blob/main/docs/images/pydantic-serdes.png\" alt=\"pydantic-serdes\" width=\"300\"/>\n</p>\n\n\n## Quick Start\n  - [Usage examples](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#usage):\n    - [Example 1: Instantiating models from serialized data](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#example-1-instantiating-models-from-serialized-data)\n    - [Example 2: Data Relationship & Model Rendering](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#example-2-data-relationship--model-rendering)\n    - [Example 3: Converting data between supported formats](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/getting_started.md#example-3-converting-data-between-supported-formats)\n  - [Configuration & Extensibility](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/configuration-and-extensibility.md)\n- [pydantic-serdes Base Models](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/base_models.md)\n- [The GLOBAL_DATA_STORE](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/the_global_data_store.md)\n- [Loaders](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/loaders.md)\n- [Dumpers](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/dumpers.md)\n- [Contributing](https://github.com/theandrelima/pydantic-serdes/blob/main/docs/contributing.md)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package that standardizes data serialization and deserialization from/to pydantic models.",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://github.com/theandrelima/pydantic-serdes"
    },
    "split_keywords": [
        "serialization",
        " deserialization",
        " parsing",
        " pydantic-models",
        " serialized-to-pydantic",
        " pydantic-to-serialized"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c792b26c82e46df69485a9224ba7c61d2f82a0088717e320c672b0ce56869cfa",
                "md5": "48394c21baa75fca5c3be62aa04ec6fc",
                "sha256": "0b7a47616d8cccf6a7824bcbfe5caa105dd5937411d5caa227e55fd025cb9985"
            },
            "downloads": -1,
            "filename": "pydantic_serdes-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48394c21baa75fca5c3be62aa04ec6fc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 20645,
            "upload_time": "2024-06-22T00:13:10",
            "upload_time_iso_8601": "2024-06-22T00:13:10.199758Z",
            "url": "https://files.pythonhosted.org/packages/c7/92/b26c82e46df69485a9224ba7c61d2f82a0088717e320c672b0ce56869cfa/pydantic_serdes-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3610d8dd428598be9214fd051411cdaa39abfda870cb8a999b01c09f7319989",
                "md5": "82c3d00df928a4a1b903b74d5374c8cd",
                "sha256": "1b96ab4febf3e84a5e09633247dd0b85c6f45df400705fc983ba0d089b5e70f0"
            },
            "downloads": -1,
            "filename": "pydantic_serdes-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "82c3d00df928a4a1b903b74d5374c8cd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 17315,
            "upload_time": "2024-06-22T00:13:11",
            "upload_time_iso_8601": "2024-06-22T00:13:11.847689Z",
            "url": "https://files.pythonhosted.org/packages/d3/61/0d8dd428598be9214fd051411cdaa39abfda870cb8a999b01c09f7319989/pydantic_serdes-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-22 00:13:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "theandrelima",
    "github_project": "pydantic-serdes",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pydantic_serdes"
}
        
Elapsed time: 0.27807s