Python attributes without boilerplate.
.. image:: https://pypip.in/version/characteristic/badge.svg :target: https://pypi.python.org/pypi/characteristic/ :alt: Latest Version
.. image:: https://travis-ci.org/hynek/characteristic.svg :target: https://travis-ci.org/hynek/characteristic :alt: CI status
.. image:: https://coveralls.io/repos/hynek/characteristic/badge.png?branch=master :target: https://coveralls.io/r/hynek/characteristic?branch=master :alt: Current coverage
.. begin
characteristic is an MIT <http://choosealicense.com/licenses/mit/>_-licensed Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols.
You just specify the attributes to work with and characteristic gives you any or all of:
__repr__,without writing dull boilerplate code again and again.
This gives you the power to use actual classes with actual types in your code instead of confusing tuple\ s or confusingly behaving namedtuple\ s.
So put down that type-less data structures and welcome some class into your life!
characteristic\ ’s documentation lives at Read the Docs <https://characteristic.readthedocs.org/>, the code on GitHub <https://github.com/hynek/characteristic>.
It’s rigorously tested on Python 2.6, 2.7, 3.3+, and PyPy.
characteristic is written and maintained by Hynek Schlawack <https://hynek.me/>_.
The development is kindly supported by Variomedia AG <https://www.variomedia.de/>_.
It’s inspired by Twisted’s FancyEqMixin <http://twistedmatrix.com/documents/current/api/twisted.python.util.FancyEqMixin.html>_ but is implemented using class decorators because sub-classing is bad for you <https://www.youtube.com/watch?v=3MNVP9-hglc>_, m’kay?
The following folks helped forming characteristic into what it is now:
Adam Dangoor <https://github.com/adamtheturtle>_Glyph <https://github.com/glyph>_Itamar Turner-Trauring <https://github.com/itamarst>_Jean-Paul Calderone <https://github.com/exarkun>_Julian Berman <https://github.com/julian>_Richard Wall <https://github.com/wallrj>_Tom Prince <https://github.com/tomprince>_