{"repo":"python-attrs/attrs","free":true,"listed":false,"github":"https://github.com/python-attrs/attrs","clone":"git clone https://github.com/python-attrs/attrs.git","description":"Python Classes Without Boilerplate","language":"Python","stars":5831,"topics":["python","boilerplate","classes","oop","attributes"],"license":"MIT","category":"dev-tools","readme_excerpt":"attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka dunder methods). Trusted by NASA for Mars missions since 2020! Its main goal is to help you to write concise and correct software without slowing down your code. Sponsors attrs would not be possible without our amazing sponsors. Especially those generously supporting us at the The Organization tier and higher: Please consider joining them to help make attrs ’s maintenance more sustainable! Example attrs gives you a class decorator and a way to declaratively define the attributes on that class: After declaring your attributes, attrs gives you: - a concise and explicit overview of the class's attributes, - a nice human-readable repr , - equality-checking methods, - an initializer, - and much more, without writing dull boilerplate code again and again and without runtime performance penalties. --- This example uses attrs 's modern APIs that have been introduced in version 20.1.0, and the attrs package import name that has been added in version 21.3.0. The classic APIs ( @attr.s , attr.ib , plus their serious-business aliases) and the attr package import name will remain indefinitely . Check out On The Core API Names for an in-depth explanation! Hate Type Annotations!? No problem! Types are entirely optional with attrs . Simply assign attrs.field() to the attributes instead of annotating them with types: Data Classes On the tin, attr","default_branch":null,"files":null,"tree":[],"storefront":"/r/python-attrs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/python-attrs/attrs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}