skillfed

tblib

Traceback serialization library.

tblib Permissive license BSD-2-Clause AGING 184 v3.2.2 released

Install

tblib on PyPI

pip

pip install tblib

uv

uv add tblib

poetry

poetry add tblib

Package 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Utilities

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_string method). No pickling is used.
  • Serialize tracebacks to/from plain dicts (the from_dict and to_dict methods). 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...

Read as markdown · JSON record · Source repository · Docs

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
pickle exceptions with tracebacksserialize exceptions across processesmultiprocessing exception handlingtraceback serializationexception chain picklingdistributed error handlingcelery exception support

Similar packages