orjson
Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy (by ijl)
mashumaro
Fast and well tested serialization library (by Fatal1ty)
orjson | mashumaro | |
---|---|---|
22 | 3 | |
7,099 | 859 | |
2.2% | 0.7% | |
8.0 | 7.8 | |
16 days ago | about 2 months ago | |
Python | Python | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
orjson
Posts with mentions or reviews of orjson.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-09-28.
-
Web scraping of a dynamic website using Python with HTTP Client
The library already has support for an HTTP client that allows bypassing Cloudflare - CurlImpersonateHttpClient. Since we have to work with JSON responses we could use parsel_crawler added in version 0.3.0, but I think this is excessive for such tasks, besides I like the high speed of orjson.. Therefore, we'll need to implement our crawler rather than using one of the ready-made ones.
- orjson: Fast, correct Python JSON lib supporting dataclasses, datetimes, NumPy
-
JSON extra uses orjson instead of ujson
(https://github.com/ijl/orjson). In this implementation, the same JSON
-
This Week In Python
orjson – Fast, correct Python JSON library
- Orjson: Fast, correct Python JSON library
- JSON dans les projets data science : Trucs & Astuces
-
JSON in data science projects: tips & tricks
orjson is the fastest JSON library available for python. It natively manages dataclass objects, datetime, numpy and UUID objects.
- Segunda linguagem
-
Litestar 2.0
As we began venturing down that road, a few things emerged that would constitute significant changes to some of the core parts of Litestar, but there were two things in particular that started a chain reaction of changes by opening up further possibilities: The new DTOs and our switch from orjson to msgspec.
- orjson: Fast, correct Python JSON lib (supports dataclasses, datetimes, numpy)
mashumaro
Posts with mentions or reviews of mashumaro.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-08-02.
- DotDict: A simple Python library to make chained attributes possible
-
apischema v0.17 - I've developed the fastest typed JSON (de)serialization library, and you can also build your GraphQL schema with it
This month, I've released version 0.17, and it's now blazing fast; there is in fact no more comparison with Pydantic, which more than 5x slower (up to 30x in serialization). It's also faster than alternatives like mashumaro or cattrs. (See the quick benchmark result in documentation, and the code)
-
I use attrs instead of pydantic
Having run into these issues with Pydantic, we've been using Mashumaro[1], which, while not having all the bells and whistles of Pydantic, has served us pretty well.
1: https://github.com/Fatal1ty/mashumaro
What are some alternatives?
When comparing orjson and mashumaro you can also consider the following projects:
msgspec - A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
marshmallow - A lightweight library for converting complex objects to and from simple Python datatypes.
ujson
ormsgpack - Msgpack serialization/deserialization library for Python, written in Rust using PyO3. Reboot of orjson. msgpack.org[Python]
cattrs - Composable custom class converters for attrs, dataclasses and friends.