typedload
Load and dump data from json-like format into typed data structures
Decision gist · record as of 2026-08-14
Yes. typedload is actively maintained, has no dependencies, installs cleanly, and solves a real problem for type-safe JSON handling in Python. The copyleft GPL-3.0 license is a constraint for proprietary projects, but the maintainer offers LGPL-3.0 licensing on request. It ranks in the top 1000 PyPI packages and is used by established organizations, making it a low-risk choice for projects that prioritize runtime type validation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with no runtime dependencies.
- Actively maintained as of 83 days ago, marked production/stable, and supports current Python versions (3.10–3.15).
License · maintenance · safety
GPL-3.0-only (copyleft) — Released under GPL-3.0-only (copyleft). The description notes an option to request LGPL-3.0 licensing by contacting the maintainer, but the default license requires derivative works to be GPL-licensed.
last release 2026-05-23 (83 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 100,335,722 downloads/mo, #345 on PyPI
Alternatives
Verify before relying
pip install typedload
import typedload
from dataclasses import dataclass
@dataclass
class User:
username: str
shell: str = 'bash'
data = {'username': 'alice', 'shell': 'zsh'}
user = typedload.load(data, User)
back_to_dict = typedload.dump(user)- Performance characteristics when handling large or deeply nested JSON structures.
- Behavior with custom type handlers and the extent of customization supported.
- How untagged unions are resolved and whether Literal tagging is required for acceptable performance.
What it is and what it does
typedload bridges the gap between untyped JSON data and Python's type system. It reads dictionaries and lists (typically from JSON) and converts them into strictly typed structures—dataclasses, NamedTuples, enums, and other typed containers—while validating that the data matches the declared schema. It also reverses the process, dumping typed structures back to JSON-compatible dictionaries and lists.
The library is designed for projects using static type checkers like Mypy. Instead of loading JSON as `Any` or hoping data matches a type annotation, you explicitly call `typedload.load()` with a target type, and the library enforces that contract at runtime. It supports a wide range of Python types—basic scalars, collections, unions, datetime objects, paths, IP addresses, and custom types via extensible handlers—making it practical for real-world JSON workflows without requiring plugins or special Mypy configuration.
Use it for
- Parse JSON API responses into dataclasses with full type safety and validation before passing to downstream code.
- Load configuration files from JSON into typed structures to catch schema mismatches early.
- Convert untyped JSON data into enums or NamedTuples for use in Mypy-checked applications.
- Serialize typed Python objects back to JSON-compatible dicts for storage or transmission.
- Validate and transform user input (from forms, CLI, etc.) into strictly typed domain objects.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
typedload is actively maintained, has no dependencies, installs cleanly, and solves a real problem for type-safe JSON handling in Python. The copyleft GPL-3.0 license is a constraint for proprietary projects, but the maintainer offers LGPL-3.0 licensing on request. It ranks in the top 1000 PyPI packages and is used by established organizations, making it a low-risk choice for projects that prioritize runtime type validation.
Install
typedload on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 83 days ago, marked production/stable, and supports current Python versions (3.10–3.15).
Requires Python 3.10 or later.
License in practice
Released under GPL-3.0-only (copyleft). The description notes an option to request LGPL-3.0 licensing by contacting the maintainer, but the default license requires derivative works to be GPL-licensed.
Quickstart
pip install typedload
import typedload
from dataclasses import dataclass
@dataclass
class User:
username: str
shell: str = 'bash'
data = {'username': 'alice', 'shell': 'zsh'}
user = typedload.load(data, User)
back_to_dict = typedload.dump(user)
Verify before relying
- Performance characteristics when handling large or deeply nested JSON structures.
- Behavior with custom type handlers and the extent of customization supported.
- How untagged unions are resolved and whether Literal tagging is required for acceptable performance.
Package facts
| License | GPL-3.0-only copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 83 days since the last release |
| First released | |
| Downloads | 100,335,722 / month, #345 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 :: DevelopersProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Typing :: Typed |
Evidence: typedload-2.41-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 › “mypy-friendly json loading”
- typedloadLoads and dumps JSON-like data into typed Python structures…
- databind.jsonDeserializes and serializes Python dataclasses to and from JSON-like…
- databind.coreDeserializes and serializes Python dataclasses and native types to…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Deserializes and serializes Python dataclasses to and from JSON-like nested data structures, supporting native Python types, enums, dates, UUIDs, and generic types with customizable serialization behavior.
Not recommended if performance is critical—the maintainers explicitly direct high-speed use cases elsewhere.
Provides type-aware JSON serialization and deserialization with runtime type validation, extending Python's built-in json module to work with typed collections, Decimal, Literal, Union, Optional, and TypedDict.
Converts dataclasses to and from dictionaries and other common types with minimal configuration, supporting nested structures, enums, unions, and custom validation.
Deserializes and serializes Python dataclasses and native types to and from JSON-like nested data structures, with support for enums, decimals, UUIDs, paths, datetimes, and generic types.
Databind deserializes JSON-like nested data structures into Python dataclasses and native types, and serializes dataclasses back to JSON-compatible dicts.
Not recommended if you prioritize serialization speed—the docs explicitly point to mashumaro for high-performance use cases.
Converts Python objects (dataclasses, attrs classes, and plain objects) to JSON-serializable dicts and strings, and deserializes them back to typed instances.
Install it if your project's Python version and dependencies are stable; avoid it if you need active maintenance or cutting-edge typing support.
See also json-strong-typing · dataclasses-json · typed-json-dataclass · undictify