dill
serialize all of Python
Decision gist · record as of 2026-08-14
Yes. dill is actively maintained, has no runtime dependencies, installs easily, carries no security vulnerabilities, and solves a real problem—serializing Python objects that pickle cannot handle. It is particularly valuable for distributed computing and multiprocessing where you need to save and restore complex Python state. The permissive BSD-3-Clause license poses no restrictions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.9
- Installation is straightforward with no runtime dependencies, and the package is actively maintained with recent commits and a stable release history since 2013.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is permissive; you can use, modify, and distribute dill freely in commercial and private projects as long as you include the license notice.
last release 2026-01-19 (207 days) · last repo commit 2026-07-17 · 2,445 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 208,130,232 downloads/mo, #198 on PyPI
Alternatives
Verify before relying
pip install dill
from dill import dumps, loads
squared = lambda x: x**2
result = loads(dumps(squared))(3) # result is 9- Whether dill's serialization is safe to use with untrusted data sources (the description warns it is not intended to be secure).
- Performance characteristics and serialized size compared to pickle for typical workloads.
- Compatibility with PyPy beyond CPython versions 3.9 through 3.14.
What it is and what it does
dill is a serialization library that extends Python's built-in pickle module to handle a much broader set of Python types. While pickle works well for basic data structures, dill can serialize functions, lambdas, nested functions, classes, metaclasses, dataclasses, and entire interpreter sessions—making it possible to save a Python environment's state and restore it elsewhere. It provides the same interface as pickle, so existing code can often switch to dill with a simple import change.
The package is commonly used for distributed computing and multiprocessing scenarios where you need to send Python code or state across a network or store it to disk. It includes diagnostic tools for debugging serialization issues and utilities to inspect pickle file contents. The library is part of pathos, a framework for heterogeneous computing, and is actively developed.
Use it for
- Serialize and transmit lambda functions and closures over a network or between processes.
- Save a complete Python interpreter session to disk and resume it later on another machine.
- Enable multiprocessing and distributed computing by serializing task functions that pickle cannot handle.
- Debug serialization problems using dill.detect.trace() to understand what objects are being stored.
- Extract and inspect source code from functions and classes using dill.source.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
dill is actively maintained, has no runtime dependencies, installs easily, carries no security vulnerabilities, and solves a real problem—serializing Python objects that pickle cannot handle. It is particularly valuable for distributed computing and multiprocessing where you need to save and restore complex Python state. The permissive BSD-3-Clause license poses no restrictions.
Install
dill on PyPI
Before you install
Installation is straightforward with no runtime dependencies, and the package is actively maintained with recent commits and a stable release history since 2013.
Requires Python >=3.9
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute dill freely in commercial and private projects as long as you include the license notice.
Quickstart
pip install dill
from dill import dumps, loads
squared = lambda x: x**2
result = loads(dumps(squared))(3) # result is 9
Verify before relying
- Whether dill's serialization is safe to use with untrusted data sources (the description warns it is not intended to be secure).
- Performance characteristics and serialized size compared to pickle for typical workloads.
- Compatibility with PyPy beyond CPython versions 3.9 through 3.14.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 207 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 208,130,232 / month, #198 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming 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 :: Scientific/EngineeringTopic :: Software Development |
Evidence: dill-0.4.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “serialize functions and lambdas”
- dilldill extends Python's pickle module to serialize and deserialize a…
- lokyLoky provides a reusable ProcessPoolExecutor that handles parallel…
- flake8-unused-argumentsA flake8 plugin that detects unused function arguments in Python code…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also cloudpickle · multiprocess · tblib · django-picklefield · jsonpickle · phpserialize · fickling · renew · hickle · sexpdata