Python decorator to automatically generate repr strings
>>> from easyrepr import easyrepr
...
>>> class UseEasyRepr:
... def __init__(self, foo, bar):
... self.foo = foo
... self.bar = bar
...
... @easyrepr
... def __repr__(self):
... ...
...
>>> x = UseEasyRepr(1, 2)
>>> repr(x)
'UseEasyRepr(foo=1, bar=2)'
Easyrepr is available on PyPI, so the easiest method of installation is via
pip
.
$ pip install easyrepr
For more installation options, see the Installation section in the User Guide.
For full documentation, check out easyrepr on Read the Docs.
If you're interesting in contributing to easyrepr, or just want to learn more about how the project is built or structured, please read our CONTRIBUTING file.
The MIT license applies to all files in the easyrepr repository and source distribution. See the LICENSE file for more info.