easyrepr

Python decorator to automatically generate repr strings


Keywords
circleci, decorator, python, python-library, python3, sphinx-doc, utility, utility-library
License
MIT
Install
pip install easyrepr==0.4.0

Documentation

easyrepr

PyPI CircleCI Read the Docs

Python decorator to automatically generate repr strings

Example

>>> 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)'

Installation

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.

Documentation

For full documentation, check out easyrepr on Read the Docs.

Contributing

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.

License

The MIT license applies to all files in the easyrepr repository and source distribution. See the LICENSE file for more info.