Skip to main content

Python decorator to automatically generate repr strings

Project description

PyPI CircleCI Read the Docs https://img.shields.io/badge/code%20style-black-000000.svg

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyrepr-0.4.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

easyrepr-0.4.0-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page