Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work. Learn more →
Similar projects and alternatives to msgspec
Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
Data validation using Python type hints
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Fast and well tested serialization framework on top of dataclasses
Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs
Ultra fast JSON decoder and encoder written in C with Python bindings
Parallel computing with task scheduling
MessagePack serializer implementation for Java / msgpack.org[Java]
Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
Core validation logic for pydantic written in rust
Parsing gigabytes of JSON per second
A comparison of several go JSON packages.
A lightweight library for converting complex objects to and from simple Python datatypes.
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Source for the TechEmpower Framework Benchmarks project
Python Classes Without Boilerplate
Up to 100x Faster FastAPI. JSON-RPC with io_uring, SIMDJSON, and pure CPython bindings
Python bindings for the simdjson project.
Optimized JSON for Go
Replacing MongoDB, Neo4J, and Elastic with 1 transactional database. Features: zero-copy semantics, swappable backends, bindings for C, C++, Python, Java, GoLang
Python library to load dynamically typed data into statically typed data structures
Typesafe, Composable Validation
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
msgspec reviews and mentions
Starlite updates March '22 | 2.0 is coming
14 projects | reddit.com/r/Python | 26 Mar 2023
This feature is yet to be released, but it will allow you to seamlessly use data modelled with for example Pydantic, SQLAlchemy, msgspec or dataclasses in your route handlers, without the need for an intermediary model; The conversion will be handled by the specific DTO "backend" implementation. This new paradigm also makes it trivial to add support for any such modelling library, by simply implementing an appropriate backend.
Show HN: Up to 100x Faster FastAPI with simdjson and io_uring on Linux 5.19
20 projects | news.ycombinator.com | 6 Mar 2023
If you're primarily targeting Python as an application layer, you may also want to check out my msgspec library. All the perf benefits of e.g. yyjson, but with schema validation like pydantic. It regularly benchmarks as the fastest JSON library for Python. Much of the overhead of decoding JSON -> Python comes from the python layer, and msgspec employs every trick I know to minimize that overhead.
Pydantic vs Protobuf vs Namedtuples vs Dataclasses
4 projects | reddit.com/r/Python | 25 Feb 2023
There's also msgspec, which per my benchmarks is: - 20-80x faster for JSON encode/decode + validate than pydantic - 5-50x faster to create/compare/order than attrs/dataclasses or pydantic.
Data Classification: Does Python still have a need for class without dataclass?
2 projects | news.ycombinator.com | 14 Feb 2023
Integrating `dataclass` more into the language builtins might be nice, if only that it may allow/encourage a more native and performant implementation. Using a dataclass right now results in slightly slower class operations than handwritten types, and much slower import times.
I maintain another dataclass-like library that's written fully as a C extension. Moving this code to C means these types are typically 5-10x faster for common operations. It'd be nice if the builtin dataclasses were equally performant.
Koda Validate: Alternative to Pydantic that is faster, more flexible, and async-compatible.
2 projects | reddit.com/r/Python | 26 Jan 2023
I maintain another "fast" validation-adjacent project (https://jcristharif.com/msgspec/) that handles only the serialization + validation component, not worrying about validation of internal function calls. I could see these projects pairing really nicely together, will definitely keep koda-validate in mind for future work.
Starlite development updates January ’23
9 projects | reddit.com/r/Python | 10 Jan 2023
In version 1.45.0, we introduced msgspec as our serialization backend, replacing orjson. This had some immediate performance benefits, but that's not the main reason we made the switch.
Starlite December '22 Updates
7 projects | reddit.com/r/Python | 11 Dec 2022
Not sure what the downvotes are for, because holy crap you weren't kidding!7 projects | reddit.com/r/Python | 11 Dec 2022
We use msgspec for serialization. This is way faster than the stdlib's json module. The most significant difference you're seeing is dataclasses. The reason there is that msgspec natively supports dataclasses, while the json module does not.
Falcon vs Flask?
4 projects | reddit.com/r/Python | 25 Nov 2022
Regarding serialisation, take a look at msgspec. It doesn’t support all the features of marshmallow out of the box, but if you can make its Structs work for you, it can be orders of magnitude faster.
Processing JSON 2.5x faster than simdjson with msgspec
5 projects | reddit.com/r/Python | 3 Oct 2022
Msgspec achieves this performance by doing less work - it's only parsing the fields that are used for the query. Allocating objects in Python can be slow, by specifying the required fields for the query (though a type annotated schema), we reduce allocations to the bare minimum resulting in measurable speedups. There's a longer writeup in the example docs if you're interested.
A note from our sponsor - Sonar
www.sonarsource.com | 29 Mar 2023
jcrist/msgspec is an open source project licensed under BSD 3-clause "New" or "Revised" License which is an OSI approved license.