dataclass-wizard
A wizard-like JSON serialization library for Python dataclasses
Decision gist · record as of 2026-08-14
Yes. Dataclass Wizard is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. It fills a genuine gap for lightweight, type-safe dataclass serialization without the overhead of heavier validation frameworks. Install it if you need JSON/YAML/TOML/environment variable marshalling for dataclasses and want automatic type coercion and case transformation out of the box.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; Python 3.6–3.8 users must install version 0.26.1.
- Low friction install with a single runtime dependency (typing-extensions).
- Actively maintained with a recent release (42 days ago) and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most projects that can include a license notice.
last release 2026-07-03 (42 days) · last repo commit 2026-08-01 · 247 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,903,540 downloads/mo, #2,205 on PyPI
Alternatives
Verify before relying
pip install dataclass-wizard
from dataclasses import dataclass
from dataclass_wizard import JSONWizard
@dataclass
class Data(JSONWizard):
value: int
data = Data.from_dict({"value": "123"})
print(data.to_json())- Performance characteristics compared to other dataclass serialization libraries in production workloads.
- Completeness of YAML and TOML support relative to their respective standard libraries.
- Behavior and limitations when handling deeply nested or circular dataclass structures.
What it is and what it does
Dataclass Wizard is a serialization library that extends Python dataclasses with mixin classes to handle conversion to and from JSON, YAML, TOML, and environment variables. It uses code generation to create fast loaders and dumpers, automatically coercing types (e.g., converting string "123" to integer 123) and transforming key casing between formats. The library is pure Python with minimal dependencies and supports modern Python versions (3.9+).
You use it by subclassing from one of its mixin classes—JSONWizard for JSON, EnvWizard for environment variables, or the base DataclassWizard—which adds methods like from_dict(), to_dict(), from_json(), and to_json(). It handles nested dataclasses, collections, typing generics, and standard types like Enum and datetime. Custom type hooks allow you to extend support for unsupported types without modifying the library itself.
Use it for
- Load configuration from JSON or YAML files into typed dataclass schemas with automatic validation and type conversion.
- Serialize API request/response dataclasses to JSON with custom key casing (e.g., snake_case to camelCase).
- Populate dataclass instances from environment variables or .env files with type coercion.
- Convert lists of dictionaries from external APIs into lists of typed dataclass instances.
- Build CLI tools that accept JSON input and output typed, validated dataclass objects.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Dataclass Wizard is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. It fills a genuine gap for lightweight, type-safe dataclass serialization without the overhead of heavier validation frameworks. Install it if you need JSON/YAML/TOML/environment variable marshalling for dataclasses and want automatic type coercion and case transformation out of the box.
Install
dataclass-wizard on PyPI
Before you install
Low friction install with a single runtime dependency (typing-extensions). Actively maintained with a recent release (42 days ago) and no known vulnerabilities. Repository shows 247 stars and steady development.
Requires Python 3.9 or later; Python 3.6–3.8 users must install version 0.26.1.
License in practice
Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most projects that can include a license notice.
Quickstart
pip install dataclass-wizard
from dataclasses import dataclass
from dataclass_wizard import JSONWizard
@dataclass
class Data(JSONWizard):
value: int
data = Data.from_dict({"value": "123"})
print(data.to_json())
Verify before relying
- Performance characteristics compared to other dataclass serialization libraries in production workloads.
- Completeness of YAML and TOML support relative to their respective standard libraries.
- Behavior and limitations when handling deeply nested or circular dataclass structures.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Actively maintained 42 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,903,540 / month, #2,205 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 :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Typing :: Typed |
Evidence: dataclass_wizard-1.0.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 to dataclass conversion”
- dataclass-wizardDataclass Wizard converts Python dataclasses to and from JSON, YAML,…
- dataclasses-json-speakeasyConverts Python dataclasses to and from JSON with a decorator or…
- pyserdeSerialize and deserialize Python dataclasses to and from JSON, YAML,…
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 · datafiles · jax-dataclasses · databind · dacite · linkml-runtime · dataclass-factory · typed-json-dataclass · dataclasses-json · pyserde