Comparison
attrs vs cobble vs dataclasses
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Classes Without Boilerplate
Maintained. Last release 8 months ago, commits in 18 of the last 26 weeks. Weaker on release cadence and contributor spread.
$
pip install attrsCreate data objects
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
$
pip install cobbleA backport of the dataclasses module for Python 3.6
Likely abandoned. No release or commit for years (last release over 6 years ago). It brings a standard-library module to older Pythons: on current versions, use the built-in one.
$
pip install dataclassesIn short
- cobble is slowing down (last release over 2 years ago): fine for existing code, risky for a new project.
- dataclasses looks abandoned: avoid it for new projects.
- attrs is the most used: 932.4M downloads a month, 51× more than cobble.
- attrs also has the best Pythie’s Index (62).
- attrs is growing fastest: downloads +14% over the last month.
- Safe default for a new project: attrs.
Side by side
| Metric | attrs | cobble | dataclasses |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 62 | 12 |