Description
msgspec is a fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML. It features:
🚀 High performance encoders/decoders for common protocols. The JSON and MessagePack implementations regularly benchmark as the fastest options for Python.
🎉 Support for a wide variety of Python types. Additional types may be supported through extensions.
🔍 Zero-cost schema validation using familiar Python type annotations. In benchmarks msgspec decodes and validates JSON faster than orjson can decode it alone.
✨ A speedy Struct type for representing structured data. If you already use dataclasses or attrs, structs should feel familiar. However, they're 5-60x faster for common operations.
All of this is included in a lightweight library with no required dependencies.
msgspec alternatives and similar packages
Based on the "Parser" category.
Alternatively, view msgspec alternatives based on common mentions on social networks and blogs.
-
Lark
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity. -
python-user-agents
A Python library that provides an easy way to identify devices like mobile phones, tablets and their capabilities by parsing (browser) user agent strings. -
pyparsing
DISCONTINUED. Python library for creating PEG parsers [Moved to: https://github.com/pyparsing/pyparsing] -
Construct
Construct: Declarative data structures for python that allow symmetric parsing and building
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of msgspec or a related project?