better-exceptions
Pretty and helpful exceptions, automatically
Decision gist · record as of 2026-08-14
Yes, if you do development work in Python and want better exception visibility without code changes. The low install friction, active maintenance, and zero known vulnerabilities make it a safe addition to a development environment. Not necessary for production unless you explicitly want formatted exception logging, in which case be careful to disable the environment variable in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires the BETTER_EXCEPTIONS environment variable to be set; without it, exceptions display normally.
- Low install friction with a single lightweight dependency (colorama).
- Actively maintained as of July 2026, though the latest release was in January 2021.
License · maintenance · safety
(unclear) — License treatment is unclear in the metadata; the description references MIT licensing, but this is not formally declared in the package metadata.
last release 2021-01-29 (2023 days) · last repo commit 2026-07-10 · 4,720 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 589,528 downloads/mo, #5,861 on PyPI
Alternatives
Verify before relying
pip install better-exceptions
export BETTER_EXCEPTIONS=1
python -m better_exceptions- Whether the package works with current Python versions (requires_python is unspecified in metadata).
- Whether the MIT license claim in the description is the authoritative license for this package.
What it is and what it does
better-exceptions hooks into Python's exception system to display tracebacks with syntax highlighting and local variable values inline, making it easier to understand what went wrong at a glance. It works by setting an environment variable and is designed to be transparent—once activated, all exceptions in your Python process are automatically formatted without code changes. The package depends only on colorama for terminal color support.
You can use it in regular scripts, the Python REPL (via `python -m better_exceptions`), unittest test runners (with a monkey patch), or Django applications (via middleware). Advanced usage allows disabling value truncation. The package is intended for development and debugging; the documentation explicitly warns against leaving the environment variable set in production to avoid leaking sensitive data in logs.
Use it for
- Interactive debugging in the Python REPL to see local variables and syntax-highlighted code context.
- Development workflows where you want richer exception output without modifying application code.
- Django projects where middleware integration provides formatted exceptions across the entire request lifecycle.
- Unit test debugging to see better-formatted assertion failures and error context.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you do development work in Python and want better exception visibility without code changes.
The low install friction, active maintenance, and zero known vulnerabilities make it a safe addition to a development environment. Not necessary for production unless you explicitly want formatted exception logging, in which case be careful to disable the environment variable in production.
Install
better-exceptions on PyPI
Before you install
Low install friction with a single lightweight dependency (colorama). Actively maintained as of July 2026, though the latest release was in January 2021.
Requires the BETTER_EXCEPTIONS environment variable to be set; without it, exceptions display normally.
License in practice
License treatment is unclear in the metadata; the description references MIT licensing, but this is not formally declared in the package metadata.
Quickstart
pip install better-exceptions
export BETTER_EXCEPTIONS=1
python -m better_exceptions
Verify before relying
- Whether the package works with current Python versions (requires_python is unspecified in metadata).
- Whether the MIT license claim in the description is the authoritative license for this package.
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagecolorama |
| Maintenance | Actively maintained 2,023 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 589,528 / month, #5,861 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: better_exceptions-0.3.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pretty print exceptions”
- better-exceptionsFormats Python exceptions with syntax highlighting and local variable…
- traceriteFormats Python exceptions and tracebacks into readable HTML, JSON,…
- traceback-with-variablesAutomatically captures and displays local variables in Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also tracerite · lib-cli-exit-tools · result · crashtest · prettyprinter · traceback-with-variables · colour-runner · pyupgrade · zope.exceptions · djhtml