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)
| 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 |