Building the product · Edition No. 28 · 22 Sep 2026

msgspec/msgspec

It reads JSON and similar formats into Python objects and checks their shape in the same pass.

← Building the productRead the whole edition →

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.

Stars4.1k
LicenceBSD-3-Clause
Latest0.21.1, dated 12 April 2026. PyPI and GitHub's /releases/latest agree, which is unusual enough to be worth recording
Good
  • 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.
Watch for
  • 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.
Similar repositories
Install
python3 -m venv venv
source venv/bin/activate
pip install msgspec

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.