# python-attrs/attrs

Python Classes Without Boilerplate

Repository: https://github.com/python-attrs/attrs
Canonical: https://ross.abutalabs.com/products/attrs
Homepage: https://www.attrs.org/
Language: Python
License: MIT
License Family: permissive
Topics: python, boilerplate, classes, oop, attributes
Last push: 2026-08-25T05:35:45+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 63, longevity 100
- inputs: {"age_days": 4236, "days_push": 8, "days_rel": 167, "gap_med": 45, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5833, forks 470 (observed 2026-08-28T04:09:30.193084+00:00)

## What it is
attrs is a Python library that generates boilerplate dunder methods like __init__, __eq__, and __repr__ for your classes, letting you define them concisely with decorators and type annotations. It is a mature, widely trusted package used in production including by NASA.

## Use cases
- reduce boilerplate in python classes
- auto-generate __init__ and __repr__
- define data classes with validation
- compare and hash objects without writing dunders
- write concise immutable value objects
- alternative to dataclasses with more features

## When to choose
- you write many plain Python classes and want less boilerplate
- you need validators, converters, or slots beyond stdlib dataclasses
- you want a mature, dependency-light, well-documented library

## When to avoid
- stdlib dataclasses meet your needs and you want zero dependencies
- you need ORM-style database mapping rather than plain classes

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools, serialization
- domain: developer-tools, programming-languages
- platform: python
- tags: oop, classes, dunder-methods, attributes, dataclasses

## Member repositories
- python-attrs/attrs (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:30.193084+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:52:04.295875+00:00, confidence not recorded.
  - readme: https://github.com/python-attrs/attrs (fetched 2026-08-28T04:09:30.193084+00:00, sha 175556ce7d52)
  - registry_pypi: https://pypi.org/pypi/attrs/json (fetched 2026-08-29T08:47:58.876738+00:00, sha 3e9ad40d43b5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
