pyserde
Yet another serialization library on top of dataclasses
Decision gist · record as of 2026-08-14
Yes. pyserde is actively maintained, has no known vulnerabilities, supports current Python versions (3.10–3.14), and offers a clean, decorator-based API for multi-format serialization of dataclasses. Install friction is low and the dependency set is reasonable. It is a solid choice for projects that need type-safe serialization without the overhead of heavier frameworks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later (3.10, 3.11, 3.12, 3.13, 3.14 supported).
- Low friction install with a pure-Python wheel.
- Actively maintained with a release 4 days ago; repository shows 851 stars and recent activity.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution in both open-source and commercial projects with only attribution required.
last release 2026-08-10 (4 days) · last repo commit 2026-08-10 · 851 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,290,473 downloads/mo, #4,104 on PyPI
Alternatives
Verify before relying
pip install pyserde
from pyserde import to_json, from_json
@serde
class Foo:
i: int
s: str
obj = Foo(i=10, s='foo')
json_str = to_json(obj)
obj_restored = from_json(Foo, json_str)- Performance characteristics compared to other serialization libraries in typical workloads.
- Maturity and stability of experimental SQLAlchemy integration.
- Whether custom (de)serializers handle all edge cases users encounter in production.
What it is and what it does
pyserde is a serialization library built on top of Python dataclasses that converts objects to and from multiple formats (JSON, YAML, TOML, MsgPack, Pickle, dict) using a decorator. You annotate your dataclass fields with PEP 484 type hints, and the library generates serialization and deserialization code automatically. It handles a wide range of types including primitives, standard containers (list, dict, set, tuple), Optional and Union types, datetime objects, UUID, Path, Decimal, Enum, and numpy types.
The library focuses on simplicity: declare your class, decorate it, and call to_json() or from_json() to convert. It supports field-level customization (rename, alias, skip conditions, custom serializers), class-level attributes (case conversion, custom serializers), and advanced features like flattening, forward references, and generic types. Dependencies are minimal and well-established (beartype for runtime type checking, jinja2 for code generation, plum-dispatch for method dispatch).
Use it for
- Convert API request/response dataclasses to JSON for REST endpoints or webhooks.
- Load configuration files (YAML, TOML) into typed dataclass objects with validation.
- Serialize domain objects to multiple formats (JSON for APIs, Pickle for caching) from a single definition.
- Build data pipelines where objects move between services in different formats without manual conversion.
- Validate and transform incoming JSON data into strongly-typed Python objects.
- Store and retrieve structured data with automatic type checking during deserialization.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
pyserde is actively maintained, has no known vulnerabilities, supports current Python versions (3.10–3.14), and offers a clean, decorator-based API for multi-format serialization of dataclasses. Install friction is low and the dependency set is reasonable. It is a solid choice for projects that need type-safe serialization without the overhead of heavier frameworks.
Install
pyserde on PyPI
Before you install
Low friction install with a pure-Python wheel. Actively maintained with a release 4 days ago; repository shows 851 stars and recent activity. Six runtime dependencies (beartype, casefy, jinja2, plum-dispatch, typing-extensions, typing-inspect) are all standard utilities with minimal overhead.
Requires Python 3.10 or later (3.10, 3.11, 3.12, 3.13, 3.14 supported).
License in practice
MIT License permits unrestricted use, modification, and distribution in both open-source and commercial projects with only attribution required.
Quickstart
pip install pyserde
from pyserde import to_json, from_json
@serde
class Foo:
i: int
s: str
obj = Foo(i=10, s='foo')
json_str = to_json(obj)
obj_restored = from_json(Foo, json_str)
Verify before relying
- Performance characteristics compared to other serialization libraries in typical workloads.
- Maturity and stability of experimental SQLAlchemy integration.
- Whether custom (de)serializers handle all edge cases users encounter in production.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesbeartypecasefyjinja2plum-dispatchtyping-extensionstyping-inspect |
| Maintenance | Actively maintained 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,290,473 / month, #4,104 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: pyserde-0.32.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “json serialization library”
- pyserdeSerialize and deserialize Python dataclasses to and from JSON, YAML,…
- orjsonorjson is a fast JSON serialization and deserialization library that…
- srslysrsly provides a unified API for serializing and deserializing data…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also databind.json · serpyco-rs · databind · dataclass-wizard · dataclasses-json · databind.core · typed-json-dataclass · dataclasses-json-speakeasy · dataclasses-jsonschema · vdf