skillfed

typedload

Load and dump data from json-like format into typed data structures

typedload Copyleft license GPL-3.0-only Active v2.41 released

Install

typedload on PyPI

pip

pip install typedload

uv

uv add typedload

poetry

poetry add typedload

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 — 82 days since the last release
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: typedload-2.41-py3-none-any.whl

Keywords: typing, types, mypy, json, schema, json-schema, python3, namedtuple, enums, dataclass, pydantic

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

About typedload

from the package's own PyPI description — quoted content, verbatim

typedload

Load and dump json-like data into typed data structures in Python3, enforcing a schema on the data.

This module provides an API to load dictionaries and lists (usually loaded from json) into Python's NamedTuples, dataclass, sets, enums, and various other typed data structures; respecting all the type-hints and performing type checks or casts when needed.

It can also dump from typed data structures to json-like dictionaries and lists.

It is very useful for projects that use Mypy and deal with untyped data like json, because it guarantees that the data will follow the specified schema.

It is released with a GPLv3 license but it is possible to ask for LGPLv3.

GPLv3 logo (image)

Donate to LtWorf (image)

Example

For example this dictionary, loaded from a json:

data = {
    'users': [
        {
            'username': 'salvo',
            'shell': 'bash',
            'sessions': ['pts/4', 'tty7', 'pts/6']
        },
        {
            'username': 'lop'
        }
    ],
}

Can be treated more easily if loaded into this...

Read as markdown · JSON record · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Loads and dumps JSON-like data into typed Python structures (dataclasses, NamedTuples, enums, etc.), enforcing schema validation at runtime while respecting type hints.

Low friction: pure Python wheel with zero runtime dependencies and active maintenance (82 days since last release). Supports Python 3.10–3.15.

GPLv3 copyleft license; the package notes LGPLv3 is available upon request. Copyleft obligations apply to derivative works; verify compatibility with your project's license before use.

Usage

import typedload
from dataclasses import dataclass

@dataclass
class User:
    username: str
    shell: str = 'bash'

data = {'username': 'alice', 'shell': 'zsh'}
user = typedload.load(data, User)
result = typedload.dump(user)

Requires Python 3.10 or later.

Verdict: Production-ready library (stable since 2018) with zero dependencies, active maintenance, and no known vulnerabilities. GPLv3 copyleft license requires verification of compatibility with your project. Ideal for projects using mypy that need runtime schema validation on untyped JSON data.

Needs verification

  • Whether LGPLv3 relicensing is readily available and under what terms or conditions.
  • Performance characteristics and suitability for high-throughput data loading scenarios.
json to typed dataclassschema validation pythonjson schema enforcementtyped data loadingmypy json validationnamedtuple from jsondataclass deserialization

Similar packages