4.1k stars · BSD-3-Clause · 0.21.1, dated 12 April 2026. PyPI and GitHub's /releases/latest agree, which is unusual enough to be worth recording · Track this in Scout
It reads JSON and similar formats into Python objects and checks their shape in the same pass.
▶Repo detailsthe review · specs · pros & cons · install
What it is
A Python library that handles JSON, MessagePack, YAML and TOML. You describe the expected shape with ordinary Python type annotations, and it validates while it decodes rather than afterwards, which is where the speed comes from. It has no required dependencies.
What it is good for. Anyone writing a Python program that accepts data from outside — a web API, a message queue, a configuration file. The problem it removes is the one where bad input travels a long way into the program before anything notices, and the error message ends up describing the wrong thing. Compared with Pydantic, which most Python programmers reach for first, this is smaller and faster and does considerably less.
- Validation and decoding in one pass, which is measurably faster than doing them separately.
- No required dependencies, so it adds almost nothing to an install.
- Code landed this morning, and version 0.21.1 is on PyPI dated 12 April 2026. Both sources agree.
- It is a library, not a program. There is nothing to open and nothing to look at.
- It is deliberately narrower than Pydantic: fewer custom validators, a smaller ecosystem, fewer framework integrations.
- Still numbered below 1.0 after five years, so the authors reserve the right to change things.
- pydantic/pydantic
It is what most Python programmers reach for first and does far more, with a much larger ecosystem, at the cost of size and speed.
Track this in Scout - ijl/orjson
It is the fastest way to read and write JSON in Python, but it stops there: it does not check that the data has the shape you expected.
Track this in Scout - python-attrs/cattrs
It also turns plain dictionaries into typed classes and back across several formats, built around attrs rather than being a decoder of its own.
Track this in Scout
python3 -m venv venv source venv/bin/activate pip install msgspec