SaaSHub helps you find the best software and product alternatives Learn more β
Cattrs Alternatives
Similar projects and alternatives to cattrs
-
Redis
Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
-
-
-
starlite
Discontinued Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs [Moved to: https://github.com/litestar-org/litestar]
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
equinox
Elegant easy-to-use neural networks + scientific computing in JAX. https://docs.kidger.site/equinox/
-
msgspec
A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
-
datamodel-code-generator
Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
-
marshmallow
A lightweight library for converting complex objects to and from simple Python datatypes.
-
-
jaxtyping
Type annotations and runtime checking for shape and dtype of JAX/NumPy/PyTorch/etc. arrays. https://docs.kidger.site/jaxtyping/
-
-
-
-
-
lupin is a Python JSON object mapper
Python document object mapper (load python object from JSON and vice-versa)
-
-
litestar-fullstack
Litestar Fullstack Reference Application with Vue, Vite, and SQLAlchemy, Docker, Task Queues, and more! (by cofin)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
cattrs discussion
cattrs reviews and mentions
-
Writing Python like itβs Rust
I'd suggest you look at my cattrs (https://catt.rs) library as a good serde lookalike in Python (sum type support present and getting better), and to use attrs instead of dataclasses in general.
-
Starlite updates March '22 | 2.0 is coming
Pydantic is by far not the only library of its kind, with prominent members of the same class being attrs, cattrs or even plain dataclasses for some use cases.
-
Noob question on saving objects in YAML files
That being said, data serialization is a very common thing to do, so naturally there are tons of libraries that automate it for you. Personally, using dataclasses and cattrs is my goto way for doing such things.
-
Taking JSON input for "posts", "tags" etc. How to escape '\' charecter or detect carefully?
I'm fond of attrs and cattrs myself, attrs make creating data classes a snap, writing all of the stupid code python requires to have a dataclass. Note the new built in dataclass is actually a limited copy of attrs. https://www.attrs.org/en/stable/ and https://github.com/python-attrs/cattrs
-
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)
- cattrs β an open source Python library for structuring and unstructuring data
-
I use attrs instead of pydantic
```
Cattrs has some problems with generics [1] [2]. Dacite and marshmallow-dataclasses don't support generics well either, with some issues around Union types.
They do work well for simple python types but what I'd like to see is guarantee that the serialisation operation is completely reversible and if not raise warning/exception.
[1] https://github.com/Tinche/cattrs/issues/149
-
A note from our sponsor - SaaSHub
www.saashub.com | 25 Mar 2025
Stats
python-attrs/cattrs is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of cattrs is Python.
Popular Comparisons
- cattrs VS marshmallow
- cattrs VS Fast JSON schema for Python
- cattrs VS pydantic
- cattrs VS serpy
- cattrs VS lupin is a Python JSON object mapper
- cattrs VS mashumaro
- cattrs VS PyValico
- cattrs VS RDFLib plugin providing JSON-LD parsing and serialization
- cattrs VS datamodel-code-generator
- cattrs VS py-object-factory