FindSoftware

msgspec

Fast serialization and validation library for Python, with built-in JSON, MessagePack, YAML and TOML support.

msgspec is a Python library that encodes and decodes JSON, MessagePack, YAML and TOML, and validates messages against schemas written as Python type annotations while decoding. It has no required dependencies. The project’s homepage lists projects that use it, including Litestar and Sanic.

Worth knowing

The TOML and YAML protocols need optional extras that the install page names: tomli and tomli_w for TOML, and PyYAML for YAML. The docs include a porting guide from orjson.

Identity

Status
Active
Maintainer
Jim Crist-Harif3
First release
20214

Rendering and deploy

Install with
pip install msgspec, conda install msgspec -c conda-forge6

Releases

Current major version
Pre-1.04
Last release
2026-09-297

Adoption

GitHub stars
4,2252
Contributors
938
Dependent repositories
2359
Dependent packages
1669

Why these figures do not compare

Sources

  1. 2026-11-16: links
    msgspec.dev/
  2. 2026-11-16: links, Written in, License, GitHub stars
    api.github.com/repos/msgspec/msgspec
  3. 2026-11-16: Maintainer
    github.com/msgspec/msgspec/blob/main/LICENSE
  4. 2026-11-16: First release, Current major version
    api.github.com/repos/msgspec/msgspec/releases?per_page=100
  5. 2026-11-16: Categories, License model
    github.com/msgspec/msgspec/blob/main/README.md
  6. 2026-11-16: Runtime, Minimum runtime, Install with
    msgspec.dev/install.html
  7. 2026-11-16: Last release
    api.github.com/repos/msgspec/msgspec/releases/latest
  8. 2026-11-16: Contributors
    api.github.com/repos/msgspec/msgspec/contributors?per_page=1
  9. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/pypi.org/packages/msgspec

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON