typed-json-dataclass
Make your dataclasses automatically validate their types
Decision gist · record as of 2026-08-14
Yes, if you need lightweight DTO validation for a codebase on Python 3.7 and can accept the risk of an abandoned package. The library is stable for its intended use case and has no known vulnerabilities, but you should not adopt it for new projects without testing thoroughly on your target Python version. Consider actively maintained alternatives if long-term compatibility is a concern.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.7,<4.0; abandoned status means no support for Python versions released after 2019-07-14.
- Low install friction—pure Python wheel with a single runtime dependency.
- However, the package has been abandoned since its latest release on 2019-07-14, which means no bug fixes, security patches, or compatibility work for newer Python versions.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute the code freely as long as you include the license notice.
last release 2019-07-14 (2588 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 95,962 downloads/mo, #13,242 on PyPI
Alternatives
Verify before relying
pip install typed-json-dataclass
from dataclasses import dataclass
from typed_json_dataclass import TypedJsonMixin
@dataclass
class Person(TypedJsonMixin):
name: str
age: int
bob = Person(name='Bob', age=24)
print(bob.to_json())- Whether the package works reliably with Python versions beyond those released in 2019.
- Current compatibility with modern versions of flake8-tuple (its only runtime dependency).
- Whether type validation catches all common type mismatches or has known gaps.
What it is and what it does
typed_json_dataclass extends Python's standard dataclass decorator with four new methods: from_dict(), from_json(), to_dict(), and to_json(). It lets you treat dataclasses as Data Transfer Objects (DTOs) by automatically converting between Python objects and JSON/dictionary representations while validating that incoming data matches your declared types. When you deserialize JSON or a dict into a dataclass, the library checks that each field's value matches its type annotation and raises a TypeError if it doesn't.
The library also supports mapping modes (e.g., converting between snake_case Python attributes and camelCase JSON keys) to bridge naming conventions. It handles nested dataclasses and collections recursively, making it useful for building typed API request/response handlers. However, the package has not been maintained since 2019-07-14, so it only officially supports Python 3.7 and may have compatibility issues with newer Python releases.
Use it for
- Deserialize JSON API responses into typed dataclass instances with automatic validation of field types.
- Serialize dataclass instances to JSON for API requests, ensuring the output matches your schema.
- Implement the DTO pattern in REST API handlers by validating incoming request bodies against dataclass type definitions.
- Convert between snake_case Python code and camelCase JSON using MappingMode for cross-platform data exchange.
- Validate that configuration files (loaded as dicts) match expected structure before use in your application.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight DTO validation for a codebase on Python 3.7 and can accept the risk of an abandoned package.
The library is stable for its intended use case and has no known vulnerabilities, but you should not adopt it for new projects without testing thoroughly on your target Python version. Consider actively maintained alternatives if long-term compatibility is a concern.
Install
typed-json-dataclass on PyPI
Before you install
Low install friction—pure Python wheel with a single runtime dependency. However, the package has been abandoned since its latest release on 2019-07-14, which means no bug fixes, security patches, or compatibility work for newer Python versions.
Requires Python >=3.7,<4.0; abandoned status means no support for Python versions released after 2019-07-14.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute the code freely as long as you include the license notice.
Quickstart
pip install typed-json-dataclass
from dataclasses import dataclass
from typed_json_dataclass import TypedJsonMixin
@dataclass
class Person(TypedJsonMixin):
name: str
age: int
bob = Person(name='Bob', age=24)
print(bob.to_json())
Verify before relying
- Whether the package works reliably with Python versions beyond those released in 2019.
- Current compatibility with modern versions of flake8-tuple (its only runtime dependency).
- Whether type validation catches all common type mismatches or has known gaps.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageflake8-tuple |
| Maintenance | Abandoned 2,588 days since the last release |
| First released | |
| Downloads | 95,962 / month, #13,242 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/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Topic :: Software Development :: Libraries :: Python Modules |
Evidence: typed_json_dataclass-1.2.1-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 › “type validation dataclasses”
- typed-json-dataclassAdds JSON serialization and type validation to Python dataclasses,…
- apischemaApischema handles JSON serialization/deserialization, GraphQL schema…
- airbyte-protocol-models-dataclassesProvides Python dataclass models for the Airbyte Protocol, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also cattrs · dacite · dataclass-csv · dataclasses-json · dataclasses-json-speakeasy · dataclasses-jsonschema · dataclass-wizard · dataclasses · datafiles · jsons