Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrisbouchard/easyrepr
Python decorator to automatically generate repr strings
https://github.com/chrisbouchard/easyrepr
circleci decorator python python-library python3 sphinx-doc utility utility-library
Last synced: about 5 hours ago
JSON representation
Python decorator to automatically generate repr strings
- Host: GitHub
- URL: https://github.com/chrisbouchard/easyrepr
- Owner: chrisbouchard
- License: mit
- Created: 2021-09-12T04:16:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T05:58:50.000Z (about 2 years ago)
- Last Synced: 2025-02-07T13:47:25.647Z (4 days ago)
- Topics: circleci, decorator, python, python-library, python3, sphinx-doc, utility, utility-library
- Language: Python
- Homepage:
- Size: 154 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE.rst
Awesome Lists containing this project
README
========
easyrepr
========.. image:: https://badge.fury.io/py/easyrepr.svg
:alt: PyPI
:target: https://pypi.org/project/easyrepr/
.. image:: https://circleci.com/gh/chrisbouchard/easyrepr/tree/main.svg?style=shield
:alt: CircleCI
:target: https://circleci.com/gh/chrisbouchard/easyrepr/tree/main
.. image:: https://readthedocs.org/projects/easyrepr/badge/
:alt: Read the Docs
:target: https://easyrepr.readthedocs.io/en/latest/
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/blackPython decorator to automatically generate repr strings
Example
=======.. code-block:: pycon
>>> 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``... code-block:: console
$ pip install easyrepr
For more installation options, see the `Installation section in the User Guide`_.
.. _available on PyPI: https://pypi.org/project/easyrepr/
.. _Installation section in the User Guide:
https://easyrepr.readthedocs.io/en/latest/guide.html#installationDocumentation
=============For full documentation, check out `easyrepr on Read the Docs`_.
* `User Guide`_
* `API Reference`_.. _easyrepr on Read the Docs: https://easyrepr.readthedocs.io/en/latest/
.. _User Guide: https://easyrepr.readthedocs.io/en/latest/guide.html
.. _API Reference: https://easyrepr.readthedocs.io/en/latest/api.htmlContributing
============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`_... _CONTRIBUTING file: CONTRIBUTING.rst
License
=======The `MIT license`_ applies to all files in the easyrepr repository and source
distribution. See the `LICENSE file`_ for more info... _MIT license: https://choosealicense.com/licenses/mit/
.. _LICENSE file: LICENSE.rst