Features
classesdataclassesvalidationboilerplatetyping
Pros and Cons
Ventajas
- + Eliminates class boilerplate
- + More features than dataclasses
- + Validators and converters
- + Optional immutability
- + Very fast
- + Mature and stable
Desventajas
- - Competes with stdlib dataclasses
- - API can be confusing
- - Less popular than pydantic
- - No native JSON serialization
- - Documentation can be dense
Use Cases
- Data class definition
- Value objects
- DTOs (Data Transfer Objects)
- Application configuration
- Domain models
- Object immutability