Skip to main content

Beautiful-repr

Helps structure the formatting of objects in Python.

Installation

pip install beautiful-repr

Why Beautiful-repr ?

  • Beautiful repr out of the box
  • Great expansion possibilities
  • Very small and simple
  • No external dependencies

Example

from beautiful_repr import *


class ShoppingCart(StylizedMixin):
    _repr_fields = (
        Field("token", value_transformer=lambda value: value[1:]),
        Field(
            "products",
            value_getter=parse_length,
            formatter=TemplateFormatter("{value} products")
        ),
    )

    def __init__(self, token: str, products: tuple[str, ] = tuple()):
        self.token = token
        self.products = tuple(products)


print(ShoppingCart("s12345", ("Potato", "iPhone", "New Vegas")))

output: ShoppingCart(token=12345, 3 products)

Metadata

Release files for beautiful-repr 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beautiful-repr 1.1.1
File Size Uploaded Provenance Actions
beautiful_repr-1.1.1.tar.gz 3.4 kB Without provenance Details for beautiful_repr-1.1.1.tar.gz

Release files / beautiful_repr-1.1.1.tar.gz

Download URL beautiful_repr-1.1.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
15a6c8eb1ed52710d32c29dd04a3785df5659b719a7ac640499021c6df3389d5
BLAKE2b-256 checksum
How to use checksums
ec6c027a7983213bc09505cbfde258916aac6f8bb05586feeab27e86ca0bd84b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Security for beautiful-repr 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page