Skip to main content

About

offlinetb is a small utility module for serializing python tracebacks for later examination. Its simple premise is:

>>> from offlinetb import distill
>>> try:
...    some_code()
... except:
...    offline_tb = distill()

distill returns a Pythonic data structure describing the exception caught. It holds, among else:

  • The exception object caught, its type, value representation, and data members

  • The traceback itself, frame by frame

  • Each frame contains its filename, function name, line number, sample lines before and after, the faulty line itself, and the locals. Each local has its data members, value representation and name distilled.

Distilled tracebacks use only simple datatypes (numbers, strings, lists, dictionaries), guaranteeing their ability to be serialized to other formats (e.g. JSON).

The original purpose of offlinetb was to display tracebacks caught via a web app, and an example for this usage is included; under the rendering/ directory you can find a sample Javascript, CSS and HTML that displays a given JSON traceback in a <div>.

Metadata

Release files for offlinetb 0.0.8

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

Source distribution (sdist)

Source distribution for offlinetb 0.0.8
File Size Uploaded
offlinetb-0.0.8.tar.gz 3.0 kB Details

Release files / offlinetb-0.0.8.tar.gz

Download URL offlinetb-0.0.8.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
40040535ab7912e6cd40376cd3e60b198e6574f83fa36c817e136be1ce79f163
BLAKE2b-256 checksum
How to use checksums
e6584916992ffc4c140dd866ca9c3461a7dc4337a1cd7d97c3d4f86354edc8a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

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