dataclass-factory
An utility class for creating instances of dataclasses
Decision gist · record as of 2026-08-14
Yes. Low install friction, active maintenance, no security issues, and permissive licensing make it a safe choice. Use it when you need to convert between dataclasses and dictionaries without schema boilerplate—particularly for API clients, config loaders, or data pipelines where type safety matters.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only the standard library dataclasses module as a runtime dependency.
- Actively maintained with recent commits and no known vulnerabilities.
License · maintenance · safety
Apache2 (permissive) — Apache 2.0 permissive license allows commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include a copy of the license.
last release 2022-07-20 (1486 days) · last repo commit 2026-07-12 · 612 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 90,552 downloads/mo, #13,579 on PyPI
Alternatives
Verify before relying
pip install dataclass_factory
from dataclasses import dataclass
import dataclass_factory
@dataclass
class Book:
title: str
price: int
factory = dataclass_factory.Factory()
book = factory.load({"title": "Example", "price": 100}, Book)
data = factory.dump(book)- Whether the claimed 10x speed advantage over marshmallow and dataclasses.asdict holds in your specific use case.
- Whether automatic name style conversion (snake_case to CamelCase) is enabled by default or requires explicit configuration.
What it is and what it does
dataclass_factory is a utility for bidirectional conversion between dataclass instances and dictionaries or other common types. It handles the boilerplate of parsing nested structures, enums, unions, and optional fields without requiring schema definitions. The factory pattern lets you load a dict into a typed dataclass instance with a single call, and dump instances back to dicts just as easily.
It's designed for scenarios where you need to deserialize external data (from APIs, configuration files, or databases) into strongly-typed Python objects, or serialize those objects back to plain data structures. The package supports cyclic references, generic dataclasses, and custom validators, making it suitable for complex domain models and data pipelines.
Use it for
- Parse API responses into dataclass instances with automatic type validation and nested object handling.
- Load configuration files (JSON, YAML) into typed dataclass structures for application settings.
- Serialize dataclass instances back to dictionaries for database storage or API responses.
- Validate and transform user input by loading it into a dataclass with custom validators.
- Handle linked-list or tree structures where objects reference other instances of the same type.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, active maintenance, no security issues, and permissive licensing make it a safe choice. Use it when you need to convert between dataclasses and dictionaries without schema boilerplate—particularly for API clients, config loaders, or data pipelines where type safety matters.
Install
dataclass-factory on PyPI
Before you install
Low friction: pure Python wheel with only the standard library dataclasses module as a runtime dependency. Actively maintained with recent commits and no known vulnerabilities.
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include a copy of the license.
Quickstart
pip install dataclass_factory
from dataclasses import dataclass
import dataclass_factory
@dataclass
class Book:
title: str
price: int
factory = dataclass_factory.Factory()
book = factory.load({"title": "Example", "price": 100}, Book)
data = factory.dump(book)
Verify before relying
- Whether the claimed 10x speed advantage over marshmallow and dataclasses.asdict holds in your specific use case.
- Whether automatic name style conversion (snake_case to CamelCase) is enabled by default or requires explicit configuration.
Package facts
| License | Apache2 permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedataclasses |
| Maintenance | Actively maintained 1,486 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,552 / month, #13,579 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: dataclass_factory-2.16-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 › “convert dataclass to dict”
- dataclass-factoryConverts dataclasses to and from dictionaries and other common types…
- daciteConverts dictionaries into dataclass instances with support for…
- serpyco-rsSerializes and deserializes Python dataclasses to/from dictionaries,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
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.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
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.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also adaptix · databind.json · jsons · itemadapter · class-resolver · databind · typedload · dataclass-wizard · databind.core · flexparser