Skip to main content

Sharetrace

A Python library & CLI for capturing and sharing comprehensive traceback information.

Overview

Sharetrace makes it easier to share Python exceptions and tracebacks with others by capturing:

  • Full exception details (type, message, traceback)
  • Code context around each frame in the stack trace
  • Git repository information (if available)
  • System information (Python version, platform, etc.)
  • Local variable values at each frame

All this information is saved to a cache directory as JSON files that can later be used to generate shareable HTML reports.

Usage

Capture Traceback Information

import sharetrace

# Install the exception hook (call this early in your program)
sharetrace.install_exception_hook()

# Now any unhandled exceptions will be captured automatically
raise ValueError("This will be captured!")

Generate Shareable HTML Pages

Just invoke the interactive CLI!

sharetrace [--open-browser]

Examples

A demo traceback can be created with sharetrace_demo and visualized with sharetrace.

Notes

  • KeyboardInterrupt and SystemExit are not captured (they use the default handler)
  • If the capture process fails, the original exception is still displayed

Metadata

Release files for sharetrace 1.0.0

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

Built distribution (wheel)

Table of built distributions (wheels) for sharetrace 1.0.0
File Interpreter ABI Platform
sharetrace-1.0.0-py3-none-any.whl Python 3 none any Details

Release files / sharetrace-1.0.0-py3-none-any.whl

Download URL sharetrace-1.0.0-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
727d21565af20485a14a9296e1dc98dc50e82ac64168ef2b31d4721f564efba8
BLAKE2b-256 checksum
How to use checksums
f1f0743f1335b09e4f9038c394e2164af26f19a11b6ac4481064befdce004ecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.11

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

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