Skip to main content

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:

pip install pydantic-serdes

poetry:

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.

pydantic-serdes

Quick Start

Metadata

Release files for pydantic_serdes 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydantic_serdes 1.0.5
File Size Uploaded
pydantic_serdes-1.0.5.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydantic_serdes 1.0.5
File Interpreter ABI Platform
pydantic_serdes-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 39.0 kB

Release files / pydantic_serdes-1.0.5.tar.gz

Download URL pydantic_serdes-1.0.5.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ea15ee35b5fff4bd27d7e64c6f0d76d0a3c2cf53ba5eb10dae97a59afb14321c
BLAKE2b-256 checksum
How to use checksums
5015eb5fbfb34c1e7bac396f98dfcd656316d97c698153a01dd11fee5bc3d076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.11.6 Darwin/25.4.0

Release files / pydantic_serdes-1.0.5-py3-none-any.whl

Download URL pydantic_serdes-1.0.5-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3bcb91ec08896a1c3b8479db7c307e9377f85d8e83891e0936b3373e51bf1b1
BLAKE2b-256 checksum
How to use checksums
4133703e0045973abeb9de6d7bf163e4fc3835dffa0f5917ee7152240989ce8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.11.6 Darwin/25.4.0

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page