dataclasses-json-speakeasy
Easily serialize dataclasses to and from JSON.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a common problem cleanly. The MIT license imposes no restrictions. Install it if you need straightforward JSON serialization for dataclasses; the two-dependency footprint and decorator-based API make it a lightweight choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only two runtime dependencies (typing-inspect and marshmallow).
- Repository is active with recent commits and no archived status.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2024-02-01 (925 days) · last repo commit 2026-05-05 · 1,486 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 880,954 downloads/mo, #4,820 on PyPI
Alternatives
Verify before relying
pip install dataclasses-json-speakeasy
from dataclasses import dataclass
from dataclasses_json import dataclass_json
@dataclass_json
@dataclass
class Person:
name: str
person = Person(name='alice')
json_str = person.to_json() # '{"name": "alice"}'
recovered = Person.from_json(json_str) # Person(name='alice')- Whether datetime encoding/decoding behavior (naive to aware conversion via system timezone) matches your application's requirements
- Performance characteristics when handling large nested dataclass hierarchies or collections
What it is and what it does
This library adds JSON serialization and deserialization methods to Python dataclasses through a simple decorator or mixin. It handles the boilerplate of converting dataclass instances to JSON strings or dictionaries, and reconstructing dataclass instances from JSON or dict input. The library supports nested dataclasses, standard collection types, and special types like datetime, UUID, and Decimal.
You apply the @dataclass_json decorator above @dataclass (or inherit from DataClassJsonMixin), then call .to_json(), .to_dict(), .from_json(), or .from_dict() on your class or instances. It also provides schema-based validation through a .schema() method backed by marshmallow, and supports field-level and class-level configuration for naming conventions like camelCase-to-snake_case conversion.
Use it for
- Serialize API request/response dataclasses to JSON for HTTP communication
- Deserialize JSON payloads into typed dataclass instances with optional validation
- Convert between Python snake_case field names and JSON camelCase conventions
- Handle nested dataclass structures with automatic recursive encoding/decoding
- Validate incoming JSON data against dataclass field types using schema validation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a common problem cleanly. The MIT license imposes no restrictions. Install it if you need straightforward JSON serialization for dataclasses; the two-dependency footprint and decorator-based API make it a lightweight choice.
Install
dataclasses-json-speakeasy on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (typing-inspect and marshmallow). Repository is active with recent commits and no archived status.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install dataclasses-json-speakeasy
from dataclasses import dataclass
from dataclasses_json import dataclass_json
@dataclass_json
@dataclass
class Person:
name: str
person = Person(name='alice')
json_str = person.to_json() # '{"name": "alice"}'
recovered = Person.from_json(json_str) # Person(name='alice')
Verify before relying
- Whether datetime encoding/decoding behavior (naive to aware conversion via system timezone) matches your application's requirements
- Performance characteristics when handling large nested dataclass hierarchies or collections
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagestyping-inspectmarshmallow |
| Maintenance | Actively maintained 925 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 880,954 / month, #4,820 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: dataclasses_json_speakeasy-0.5.11-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 › “dataclass json serialization”
- dataclasses-json-speakeasyConverts Python dataclasses to and from JSON with a decorator or…
- dataclass-wizardDataclass Wizard converts Python dataclasses to and from JSON, YAML,…
- dataclasses-jsonConverts Python dataclasses to and from JSON with minimal…
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 dataclasses-json · typed-json-dataclass · dataclass-wizard · pysubtypes · databind.json · databind · databind.core · json-encoder · dataclasses-jsonschema · python-toon