Skip to main content

pretty-print with color

Project description

clog

This project is now simply a shortcut for using rich.

If you want to save yourself a dependency, just use rich.

Usage

Pass any data into clog and it'll get pretty-printed.

>>> from clog import clog
>>> data = {'here': 'is some data'}
>>> clog(data)

You can also give it a title:

>>> clog(data, title="My Data")

Or change the color:

>>> clog(data, title="My Data", color="red")

Colors

This library uses rich under the hood, so it theoretically supports any color that rich supports.

Disclaimer

The clog function is now simply a wrapper around:

from rich.panel import Panel
from rich.pretty import Pretty
from rich import print

print(Panel(Pretty(msg), title=title, subtitle=subtitle, border_style=color))

So, seriously... just use rich.

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

clog-0.3.1.tar.gz (2.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page