Skip to main content

philiprehberger-stacktrace

Tests PyPI version License

Turn Python stack traces into cleaner, more readable output.

Installation

pip install philiprehberger-stacktrace

Usage

Global Install

from philiprehberger_stacktrace import install

install()  # replaces sys.excepthook

Manual Formatting

from philiprehberger_stacktrace import format_exception

try:
    risky_operation()
except Exception as e:
    report = format_exception(e)
    print(report.short())     # one-line summary
    print(report.detailed())  # colored with source context

API

Function / Class Description
install(color=True, context=2, hide_stdlib=True) Replace sys.excepthook
format_exception(exc) Returns ExceptionReport
report.short() One-line summary
report.detailed(color, context, hide_stdlib) Full formatted output

Development

pip install -e .
python -m pytest tests/ -v

License

MIT

Release files for philiprehberger-stacktrace 0.1.6

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

Source distribution (sdist)

Source distribution for philiprehberger-stacktrace 0.1.6
File Size Uploaded
philiprehberger_stacktrace-0.1.6.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for philiprehberger-stacktrace 0.1.6
File Interpreter ABI Platform
philiprehberger_stacktrace-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / philiprehberger_stacktrace-0.1.6.tar.gz

Download URL philiprehberger_stacktrace-0.1.6.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4adb59abf83b7bba876cc7d785e89f08ac714fe2c61fac6f0cea8f8bb9b851f5
BLAKE2b-256 checksum
How to use checksums
777fd5d33052dfde19fe4c58db0091b5b79f84fe4f3322b2be16d6c6afcf4aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / philiprehberger_stacktrace-0.1.6-py3-none-any.whl

Download URL philiprehberger_stacktrace-0.1.6-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76ba6c2a117100f61d73cfa43c002ae4ad0a4424ccb0cecd5d58c6c9eebec86e
BLAKE2b-256 checksum
How to use checksums
7bac488d55ea8be87e612c8b28520b7bade7e9f2bbcec2c3c6ca8ab7fd49d460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.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