tracerite
Human-readable HTML tracebacks for Python exceptions
What it is and what it does
TraceRite intercepts Python exceptions and renders them in human-readable formats—HTML for notebooks and web frameworks, colored terminal output for scripts and REPLs, and JSON for machine processing. It displays variable values at each frame, highlights syntax errors, and handles complex exception chains (including Python 3.11+ ExceptionGroups) in chronological order.
The package integrates via a single import in scripts, a Jupyter magic command, or monkeypatching for FastAPI and Sanic. It smartly prunes output to show only relevant context, differentiates between context-manager failures (entry vs. exit vs. expression), and supports custom styling via CSS variables or terminal color configuration. No configuration is required for basic use.
Use it for:
- Debug Jupyter notebooks by seeing formatted exceptions with variable values instead of raw Python tracebacks.
- Improve FastAPI error responses with HTML tracebacks that show context and variable state during development.
- Diagnose concurrent execution errors (ExceptionGroups) in Python 3.11+ with clear visualization of all subexceptions.
- Format terminal application errors with color and structure for easier reading in long-running CLI tools.
- Export exception data as JSON for automated error logging, monitoring, or post-mortem analysis systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Formats Python exceptions and tracebacks into readable HTML, JSON, and terminal output with variable inspection, working in Jupyter, FastAPI, Sanic, and standard Python scripts.
Yes. TraceRite is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a real problem—making Python exceptions readable across multiple environments. The permissive public-domain license removes any legal concern. Install it if you spend time debugging Python code in notebooks, web frameworks, or terminals.
Install
tracerite on PyPI
pip
pip install traceriteuv
uv add traceritepoetry
poetry add traceriteInstalling tracerite
Before you install
Low friction: pure Python wheel with a single runtime dependency (html5tagger). Active maintenance with a recent release 24 days ago.
License in practice
Public Domain license with permissive treatment means no restrictions on use, modification, or distribution in any context.
Quickstart
pip install tracerite
# In Python script or REPL:
import tracerite
tracerite.load()
# In Jupyter:
%pip install tracerite
%load_ext tracerite
Requires Python 3.10 or later.
Verify before relying
- Whether variable inspection works equally well across all three output formats (HTML, JSON, terminal).
- Performance impact of enabling tracerite in long-running applications or high-error-rate scenarios.
- Compatibility with third-party exception handlers or logging frameworks beyond logging.exception.
Package facts
| License | Public Domain (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — html5tagger |
| Maintenance | actively maintained — 24 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,151,501/month — #4,295 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tracerite-2.6.3-py3-none-any.whl
Tags
More Debuggers packages
Extracts and displays stack frame and traceback…
permissive · top 1,000 on PyPI
debugpydebugpy is a Debug Adapter Protocol…
permissive · top 1,000 on PyPI
pylintPylint is a static code analyzer that checks…
copyleft · top 1,000 on PyPI
yamllintyamllint checks YAML files for syntax errors,…
copyleft · top 1,000 on PyPI
ipdbipdb is an IPython-enabled debugger that…
permissive · top 5,000 on PyPI
memrayMemray is a memory profiler for Python that…
permissive · top 5,000 on PyPI
better-exceptionsFormats Python exceptions with syntax…
unclear · top 15,000 on PyPI
colored-tracebackAutomatically colors Python exception…
permissive · top 5,000 on PyPI
pretty-errorsReformats Python exception tracebacks with…
permissive · top 15,000 on PyPI
stackprinterReplaces Python's default exception traceback…
permissive · top 15,000 on PyPI
traceback-with-variablesAutomatically captures and displays local…
permissive · top 15,000 on PyPI
tblibSerializes exceptions and tracebacks to pickle…
permissive · top 1,000 on PyPI
cli-exit-toolsHandles proper exit procedures for CLI…
permissive · top 5,000 on PyPI
richRich renders styled text, tables, progress…
permissive · top 100 on PyPI
devtoolsProvides a `debug()` function that prints…
permissive · top 5,000 on PyPI