dataclasses-json
Easily serialize Data Classes to and from JSON (by lidatong)
dacite
Simple creation of data classes from dictionaries. (by konradhalas)
dataclasses-json | dacite | |
---|---|---|
1 | 4 | |
1,300 | 1,663 | |
- | - | |
7.1 | 3.2 | |
6 days ago | 5 months ago | |
Python | Python | |
MIT License | MIT License |
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.
dataclasses-json
Posts with mentions or reviews of dataclasses-json.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-11.
dacite
Posts with mentions or reviews of dacite.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-08-07.
-
What's the difference between using and not using wrapper libraries for APIs?
This is a good approach, but FYI there are already very good libraries that can be used to create objects from JSON/dicts in a similar way to your example, like dacite or pydantic. A lot of boilerplate can be avoided with these.
-
Project files for my own python GUI
You'll need to be able to serialize ProjectState objects into some file format that you can save to disk, like json. When working with dataclasses, dacite can also be very helpful to convert to/from dictionaries. (There's other options available, of course.)
-
Master Dataclasses in Python Part 1 - Basic Structure and Validation
You also can't read any nested dataclassed from a dictionary. dacite! will help with this, but witihout it you can't just initialize it with NestedDataclass(**some_dict) or somethings like this. In the way it works for Plain dataclass.
-
A look the new pattern matching in Python 3.10.0a6
There are also tools such as dacite and desert, which take a different approach to dealing with serialized data
What are some alternatives?
When comparing dataclasses-json and dacite you can also consider the following projects:
dataconf - Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict/cli support.
pydantic - Data validation using Python type hints
orjson - Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
dataclassy - A fast and flexible reimplementation of data classes
python-youtube - A simple Python wrapper for YouTube Data API :sparkles: :cake: :sparkles: .
Elasticsearch - Free and Open, Distributed, RESTful Search Engine
jmespath.py - JMESPath is a query language for JSON.
mashumaro - Fast and well tested serialization library
pokebase - Python 3 wrapper for Pokéapi v2
dataclasses-json vs dataconf
dacite vs pydantic
dataclasses-json vs orjson
dacite vs orjson
dataclasses-json vs dataclassy
dacite vs python-youtube
dataclasses-json vs Elasticsearch
dacite vs dataclassy
dataclasses-json vs python-youtube
dacite vs jmespath.py
dataclasses-json vs mashumaro
dacite vs pokebase