msgspec/msgspec
A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML observed · 2026-08-28
Health v2 · maintenance only
83/100
- Activity 97
- Release rhythm 55
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 135
- age_days: 2045
- days_rel: 143
- days_push: 21
- n_releases_24m: 4
Adoption not part of the score
4063 stars · 180 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
msgspec is a fast Python serialization and validation library supporting JSON, MessagePack, YAML, and TOML. It combines high-performance encoders/decoders with zero-cost schema validation using Python type annotations and a speedy Struct type.
Use cases
- fast json parsing in python
- validate api payloads with type annotations
- encode and decode msgpack messages
- replace dataclasses with faster structs
- generate json schema from python types
- parse toml config files
- deserialize yaml into typed objects
When to choose
- you need the fastest JSON or MessagePack encoding/decoding in Python
- you want validation integrated into deserialization with no extra dependencies
- you need a lightweight alternative to pydantic for message schemas
- you're porting from orjson and want validation included
When to avoid
- you need advanced validation features like pydantic's validators or custom constraints
- you're on Python < 3.10
- you need serialization formats beyond JSON, MessagePack, YAML, and TOML
Facets
library · maturity stable
serialization form-handling parser developer-tools apis backend python cross-platform wasm json msgpack yaml toml json-schema type-annotations structs high-performance serde data-engineering
5 sources
- readme: https://github.com/msgspec/msgspec · fetched 2026-08-28 · 863751d0e271
- homepage: https://msgspec.dev · fetched 2026-08-29 · 588b4df46d75
- site_page: https://msgspec.dev/install.html · fetched 2026-08-29 · 674877366507
- site_page: https://msgspec.dev/api.html · fetched 2026-08-29 · bfacbe6085ed
- site_page: https://msgspec.dev/changelog.html · fetched 2026-08-29 · da192846d77e
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| msgspec/msgspec | main | 83 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem