Attrs – The One Python Library Everyone Needs

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • pydantic

    Data validation using Python type hints

  • Pydantic is dataclasses, except types are validated at runtime? It's nice and looks just like a normal dataclass looking at https://pydantic-docs.helpmanual.io/

    For any larger program, pervasive type annotations and "compile" time checking with mypy is a really good idea though, which somewhat lessens the need for runtime checking.

  • dataclasses

  • dataclasses was explicitly inspired by attrs. https://github.com/ericvsmith/dataclasses/issues/1

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • CPython

    The Python programming language

  • This is only remotely relevant but I recently learned that the related `dataclasses` id implemented by constructing _string representations_ of functions and calling `exec` on them.

    https://github.com/python/cpython/blob/3.10/Lib/dataclasses....

    Kind of blew my mind

  • traits

    Observable typed attributes for Python classes (by enthought)

  • My favourite among this class of Python libraries has been traits from Enthought:

    https://github.com/enthought/traits

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts