1 रिपॉजिटरी
Allows per-attribute equality and ordering logic via user-supplied callables or helpers.
Distinct from Comparison Attribute Selectors: Distinct from Comparison Attribute Selectors: adds custom callable logic per attribute, not just selecting which attributes participate.
Explore 1 awesome GitHub repository matching web development · Custom Comparison Functions. Refine with filters or upvote what's useful.
attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering methods from declarative class attribute definitions. At its core, it provides a class decorator metaprogramming framework that intercepts class creation to rewrite the class body, producing dunder methods without manual boilerplate. The library includes a comprehensive attribute validation toolkit with built-in validators for type checks, range constraints, regex matching, length limits, and logical composition of validation rules. The library distinguishes itself through it
Customizes equality and ordering comparison for individual attributes using a callable.