tblib
Traceback serialization library.
Install
tblib on PyPI
pip
pip install tblibuv
uv add tblibpoetry
poetry add tblibPackage facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 274 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: tblib-3.2.2-py3-none-any.whl
Keywords: traceback, debugging, exceptions
About tblib
from the package's own PyPI description — quoted content, verbatim
======== Overview ========
Serialization library for Exceptions and Tracebacks.
- Free software: BSD license
It allows you to:
Pickle <https://docs.python.org/3/library/pickle.html>_ tracebacks and raise exceptions with pickled tracebacks in different processes. This allows better error handling when running code over multiple processes (imagine multiprocessing, billiard, futures, celery etc).- Create traceback objects from strings (the
from_stringmethod). No pickling is used. - Serialize tracebacks to/from plain dicts (the
from_dictandto_dictmethods). No pickling is used. - Raise the tracebacks created from the aforementioned sources.
- Pickle an Exception together with its traceback and exception chain
(
raise ... from ...) (Python 3 only)
Again, note that using the pickle support is completely optional. You are solely responsible for security problems should you decide to use the pickle support.
Installation
::
pip install tblib
Documentation
.. contents:: :local:
Pickling tracebacks ~~~~~~~~~~~~~~~~~~~
Note: The traceback objects that come out are stripped of some attributes (like...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Serializes exceptions and tracebacks to pickle, dicts, or strings, enabling exception handling across multiple processes and preserving full traceback context when exceptions are passed between workers.
Pure Python wheel with no runtime dependencies and low install friction. Last release 274 days ago; repo remains active with recent commits, though maintenance pace is aging.
BSD-2-Clause (permissive) allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
Usage
pip install tblib
from tblib import pickling_support
pickling_support.install()
import pickle, sys
try:
1/0
except:
pickled = pickle.dumps(sys.exc_info())
exc_type, exc_val, tb = pickle.loads(pickled)
# Traceback object can now be raised or inspected in another process
Requires Python 3.9 or later; pickle support is optional but carries inherent deserialization security risks if untrusted data is unpickled.
Verdict: Stable, dependency-free library for cross-process exception handling in distributed systems. No known vulnerabilities, permissive license, and broad Python 3.9+ support make it safe to adopt. Maintenance is aging but the codebase is mature and the repo remains active.
Needs verification
- Whether the 274-day release gap reflects deliberate stability or reduced maintenance capacity
- Real-world performance impact when pickling large exception chains or deeply nested tracebacks
Similar packages
permissive · top 1,000 on PyPI
crashtestpermissive · top 1,000 on PyPI
dillpermissive · top 1,000 on PyPI
diskcachepermissive · top 1,000 on PyPI
billiardpermissive · top 1,000 on PyPI
decoratorpermissive · top 1,000 on PyPI
stack-datapermissive · top 1,000 on PyPI
wraptpermissive · top 100 on PyPI
sphinxcontrib-serializinghtmlpermissive · top 1,000 on PyPI
pyrsistentpermissive · top 1,000 on PyPI