Skip to main content

rich-tracebacks

rich-tracebacks automates the installation of Rich's traceback handler in Python programs. Compared to Rich's own sanctioned method of automatically installing its traceback handler, rich-tracebacks is markedly simpler and agnostic to your virtual environment.

Installation

pip install rich-tracebacks

Usage

Enabling

Set the RICH_TRACEBACKS environment variable. The value of the variable doesn't matter, but we'll use 1 as an example.

export RICH_TRACEBACKS=1

That's it. Rich's traceback handler will be automatically installed each time you run your program.

[!IMPORTANT] If you use PyCharm, you may notice that rich-tracebacks doesn't work when using PyCharm's debugger. You can fix this by setting the RICH_TRACEBACKS_PYCHARM environment variable to any value.

Disabling

Unset the RICH_TRACEBACKS environment variable.

unset RICH_TRACEBACKS

Configuration

You can configure the traceback handler with its supported options by creating an rt_config.py file at your project's root. The file should contain a dictionary named config that maps option names to their intended values. For example:

# rt_config.py

config = {
    "show_locals": True,
    "width": 120,
    "theme": "monokai",
    ...
}

Options that are not defined in rt_config.py will fall back to their default values. If rt_config.py does not exist, all options will fall back to their default values.

Metadata

Release files for rich-tracebacks 2.0.0

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

Source distribution (sdist)

Source distribution for rich-tracebacks 2.0.0
File Size Uploaded
rich_tracebacks-2.0.0.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rich-tracebacks 2.0.0
File Interpreter ABI Platform
rich_tracebacks-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / rich_tracebacks-2.0.0.tar.gz

Download URL rich_tracebacks-2.0.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4a77644c37ca839be6ff396f014a9c08af3af9fc60f1c75653c01e4bc712c690
BLAKE2b-256 checksum
How to use checksums
1bfdc0f6aed727eecf8abd706341eca1844316cf2abd6f8bfbd17b392ff1c627
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rich_tracebacks-2.0.0-py3-none-any.whl

Download URL rich_tracebacks-2.0.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a2dfb5b0fda53839e395d05468972dc22b3c1775c859f1b73f97194bab468e9
BLAKE2b-256 checksum
How to use checksums
481ad2cf1475f726eb19a67f0e4b3b462a08cec2025e051affb58326f22a8c51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.2.1

2 release files

1.1.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

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