Skip to main content

A very lightweight Python decorator to automatically add a clean and readable __repr__ representation to your classes.

Project description

Custom Repr

A simple decorator to add pretty representation to Python classes.

Installation

pip install custom-repr

Usage

import custom_repr

class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

person = Person("John", 30)

print(person)  # Person(name: "John", age: 30)

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

custom_repr-0.2.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

custom_repr-0.2.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file custom_repr-0.2.2.tar.gz.

File metadata

  • Download URL: custom_repr-0.2.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for custom_repr-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3cff4180ef01fc0c6dd1d754ffb888ac9e58f06010308b79ca0a82f647afa557
MD5 af8b11d2bdee2d2256a553c44643c50e
BLAKE2b-256 4115acf36b32d09735529dbff512d0bcd4c5882e5171efd273676e545e56029f

See more details on using hashes here.

File details

Details for the file custom_repr-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: custom_repr-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for custom_repr-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f87ea43768d1959e00706bf9ecdc375fe83ef675d92b9b5c241c4ad63fffe5b9
MD5 77343e182279f63afc73d79d3c2a6034
BLAKE2b-256 8b31a2ebd444addf333abf929460a9589e403d2437c01e4c9021dbd0c90397eb

See more details on using hashes here.

Supported by

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