Hacker ApprovedDepartments

Python dataclasses

Shares rank 7 of 14 Python libraries by recommenders

People recommend Python dataclasses for declaring a set of properties that are readable, syntactically nice, and work with static type checking.

People recommend Python dataclasses for declaring a set of properties that are readable, syntactically nice, and work with static type checking.

7 people gave an opinion

recommend it
7
criticize it
0
approval share
100%
Each figure is one person. RecommendsCriticizes

Recommended in 3 of 13 months

  1. November 2025: recommended
  2. December 2025: recommended
  3. January 2026: not recommended
  4. February 2026: not recommended
  5. March 2026: recommended
  6. April 2026: not recommended
  7. May 2026: not recommended
  8. June 2026: not recommended
  9. July 2026: not recommended
  10. August 2026: not recommended
  11. September 2026: not recommended
  12. October 2026: not recommended
  13. November 2026: not recommended (month in progress)

Why it doesn’t carry the badge

  • 7 people recommend itNeeds 10 or more, not met.
  • Nobody criticizes itNeeds 2 to 1 or better, met.
  • Recommended in 3 of 13 monthsNeeds 4 or more, not met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Readable, nice syntax for declared properties

    “Having a declared set of properties is really useful, and it doesn't hurt either that they're syntactically nicer to use.”

    Comment from 11 Dec 2025 in “A “frozen” dictionary for Python”

    “I find the data classes example extremely readable.”

    Comment from 7 Nov 2025 in “Ruby already solved my problem”

Other Python libraries people recommend

The four most recommended other Python libraries, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

Python dataclasses compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
Polars1525075%121 yr3 ownersApproved
pandas939849%1110 yrs7 owners—
NumPy863273%12—Approved
SciPy12286%7—Approved
Python dataclassesThis page70100%3——
See all 14 Python libraries, ranked

What people said

6 of the 7 comments that mention it, newest first. Each links to the original comment.

“you'd also get static type checking and they are faster”

RecommendsComment from 17 Mar 2026 in “Show HN: Oxyde – Pydantic-native async ORM with a Rust core”

“Having a declared set of properties is really useful, and it doesn't hurt either that they're syntactically nicer to use.”

RecommendsComment from 11 Dec 2025 in “A “frozen” dictionary for Python”

“it's quite likely you're better off with dataclasses or namedtuples anyway”

RecommendsComment from 11 Dec 2025 in “A “frozen” dictionary for Python”

“there's @dataclass in 2025”

RecommendsComment from 26 Nov 2025 in “Python is not a great language for data science”

“use Python dataclasses that serialize to YAML”

RecommendsComment from 13 Nov 2025 in “Helm 4.0”

“I find the data classes example extremely readable.”

RecommendsComment from 7 Nov 2025 in “Ruby already solved my problem”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.