Python attributes without boilerplate
attrs is an MIT-licensed Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols: >>> import attr >>> @attr.s ... class C(object): ... x = attr.ib(default=42) ... y = attr.ib(default=attr.Factory(list)) >>> i = C(x=1, y=2) (If you don't like the playful attr.s and attr.ib, you can also use their no-nonsense aliases attr.attributes and attr.attr). You just specify the attributes to work with and attrs gives you: a nice human-readable __repr__, a complete set of comparison methods, an initializer, and much more without writing dull boilerplate code again and again.
$
pkg install py311-attrsOrigin
devel/py-attrs
Size
667KiB
License
MIT
Maintainer
sunpoet@FreeBSD.org
Dependencies
1 packages
Required by
73 packages
Dependencies (1)
Required By (73)
cowriekleene-clinoxpg_activitypy311-aiohttppy311-aiohttp-sockspy311-aiorpcXpy311-aiorpcX-legacypy311-aiosmtpdpy311-asdfpy311-attrs-strictpy311-autobahnpy311-cattrspy311-cattrs23py311-cfgribpy311-clldutilspy311-commoncodepy311-container-inspectorpy311-csvwpy311-cycloptspy311-debian-inspectorpy311-eccodespy311-eemeterpy311-extractcodepy311-fionapy311-flake8-bugbearpy311-flankerpy311-fontmakepy311-frictionlesspy311-glom+ 43 more