msgspec-m
A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML.
Decision gist · record as of 2026-08-14
Yes, if you need fast serialization with schema validation and accept the trade-off of a community fork in maintenance mode. The package offers genuine performance gains and is well-suited for latency-sensitive services, data pipelines, and API layers. However, be aware that it receives only minimal maintenance and packaging updates—not new features—so evaluate whether upstream msgspec or the original fork better fits your long-term needs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; compiled wheels are provided but source builds require a C compiler.
- Medium install friction due to compiled wheels; however, prebuilt binaries are available for common platforms (macOS, Linux, Windows) across Python 3.10–3.14.
- The package is aging (273 days since last release) and explicitly states it accepts only minimal maintenance and packaging updates, not new features.
License · maintenance · safety
BSD (permissive) — BSD license (permissive) imposes no significant restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2025-11-14 (273 days) · last repo commit 2025-11-14 · 7 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 74,779 downloads/mo, #14,794 on PyPI
Alternatives
Verify before relying
pip install msgspec-m
import msgspec
class User(msgspec.Struct):
name: str
email: str | None = None
alice = User("alice", email="alice@example.com")
msg = msgspec.json.encode(alice)
decoded = msgspec.json.decode(msg, type=User)- Whether this fork receives timely security patches or bug fixes relative to the upstream jcrist/msgspec repository.
- Whether the fork's wheel availability on PyPI is stable long-term or subject to maintenance gaps.
What it is and what it does
msgspec-m is a community-maintained fork of msgspec packaged as a PyPI wheel for easier installation. It provides high-performance encoders and decoders for JSON, MessagePack, YAML, and TOML, combined with zero-cost schema validation using standard Python type annotations. The library includes a Struct type for representing structured data with performance characteristics significantly faster than dataclasses or attrs for common operations.
The package is designed to handle the full serialization and validation workflow: you define schemas using type annotations, encode messages to one of the supported protocols, and decode them back with optional schema validation. It has no runtime dependencies and is intended as a drop-in replacement for slower serialization libraries when performance matters. However, the fork explicitly accepts only minimal maintenance and packaging updates, not new features.
Use it for
- Replace slower JSON libraries in performance-critical applications that need fast encoding and decoding.
- Validate incoming API payloads or configuration files against Python type schemas without separate validation overhead.
- Serialize structured data to MessagePack, YAML, or TOML for interoperability with non-Python systems.
- Use Struct types as lightweight, fast alternatives to dataclasses when defining message or data transfer objects.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast serialization with schema validation and accept the trade-off of a community fork in maintenance mode.
The package offers genuine performance gains and is well-suited for latency-sensitive services, data pipelines, and API layers. However, be aware that it receives only minimal maintenance and packaging updates—not new features—so evaluate whether upstream msgspec or the original fork better fits your long-term needs.
Install
msgspec-m on PyPI
Before you install
Medium install friction due to compiled wheels; however, prebuilt binaries are available for common platforms (macOS, Linux, Windows) across Python 3.10–3.14. The package is aging (273 days since last release) and explicitly states it accepts only minimal maintenance and packaging updates, not new features.
Requires Python 3.9 or later; compiled wheels are provided but source builds require a C compiler.
License in practice
BSD license (permissive) imposes no significant restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install msgspec-m
import msgspec
class User(msgspec.Struct):
name: str
email: str | None = None
alice = User("alice", email="alice@example.com")
msg = msgspec.json.encode(alice)
decoded = msgspec.json.decode(msg, type=User)
Verify before relying
- Whether this fork receives timely security patches or bug fixes relative to the upstream jcrist/msgspec repository.
- Whether the fork's wheel availability on PyPI is stable long-term or subject to maintenance gaps.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Aging 273 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,779 / month, #14,794 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9 |
Evidence: msgspec_m-0.19.3-cp310-cp310-macosx_10_9_x86_64.whl; msgspec_m-0.19.3-cp310-cp310-macosx_11_0_arm64.whl; msgspec_m-0.19.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; msgspec_m-0.19.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; msgspec_m-0.19.3-cp310-cp310-musllinux_1_2_aarch64.whl; msgspec_m-0.19.3-cp310-cp310-musllinux_1_2_x86_64.whl; msgspec_m-0.19.3-cp310-cp310-win_amd64.whl; msgspec_m-0.19.3-cp311-cp311-macosx_10_9_x86_64.whl; msgspec_m-0.19.3-cp311-cp311-macosx_11_0_arm64.whl; msgspec_m-0.19.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; msgspec_m-0.19.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; msgspec_m-0.19.3-cp311-cp311-musllinux_1_2_aarch64.whl; msgspec_m-0.19.3-cp311-cp311-musllinux_1_2_x86_64.whl; msgspec_m-0.19.3-cp311-cp311-win_amd64.whl; msgspec_m-0.19.3-cp312-cp312-macosx_10_13_x86_64.whl; msgspec_m-0.19.3-cp312-cp312-macosx_11_0_arm64.whl; msgspec_m-0.19.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; msgspec_m-0.19.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; msgspec_m-0.19.3-cp312-cp312-musllinux_1_2_aarch64.whl; msgspec_m-0.19.3-cp312-cp312-musllinux_1_2_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “fast JSON serialization Python”
- msgspec-mmsgspec-m is a fast serialization and validation library supporting…
- orjsonorjson is a fast JSON serialization and deserialization library that…
- python-rapidjsonFast JSON serialization and deserialization with JSON Schema…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also msgspec · ormsgpack · u-msgpack-python · msgpack-python · srsly · msgpack · msgspec-click · quart-schema · pyserde · python-rapidjson