attrs

Class boilerplate generator that produces well-behaved data classes with validators, converters, and slots — predates and complements dataclasses.

data-validation-frameworksInactive
73
Hero Score
Popularity
64
Performance
45
Ecosystem
75
Maturity
100
Dev Experience
83
⭐ 5,852 stars⬇ 179.2M downloads/wkFirst release: Feb 2015Last release: Mar 2026
Async Support: NoPlugin Extensions: HighSpeed: FastDoc Quality: Very highLearning Curve: Easy

Pros

  • • Powerful built-in validators and converters with minimal boilerplate
  • • Slots support and memory efficiency out of the box
  • • Mature, battle-tested, and widely adopted across the Python ecosystem

Cons

  • • External dependency where stdlib dataclasses may suffice
  • • Two parallel APIs (modern @define vs legacy @attr.s) can confuse newcomers
  • • No built-in JSON serialization (requires cattrs or similar)

Alternatives in data-validation-frameworks

Compare Python Packages with ease.