# dill

> Extends Python's pickle to serialize almost any Python object

Source: https://talira.ai/catalog/dill-7gzychzq
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / serialization](https://talira.ai/categories/libraries/serialization), [languages / python](https://talira.ai/categories/languages/python)
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (BSD-3-Clause).
- Free tier: yes[^2]
- Backed by: [The Uncertainty Quantification Foundation](https://talira.ai/orgs/uq-foundation.md)

dill extends Python's pickle module to serialize and deserialize most built-in Python types, with the same interface as pickle. It can also pickle lambdas, nested functions, functions with yields, classes, modules and code objects that pickle can't, save and load a whole interpreter session, extract the source of functions and classes, and help diagnose pickling errors. Its main use is sending Python objects across the network as byte streams. It isn't secure against malicious data, so only unpickle data you trust. It's part of the pathos framework. Install it from PyPI as dill.

## Links

- GitHub: https://github.com/uqfoundation/dill
- Docs: https://dill.readthedocs.io/

## Problems it solves

- pickle a lambda or nested function in Python without a PicklingError
- send a Python function to another machine to run there
- save my whole Python interpreter session and restore it later

## Features

- same interface as Python's pickle module
- pickles lambdas, nested functions, classes, modules and code objects
- saves and loads whole interpreter sessions
- extracts the source code of functions and classes
- tools to diagnose pickling errors

## Limitations

- Not secure against erroneously or maliciously constructed data: only unpickle data from a trusted source.[^1]
- Can't yet pickle frame, generator or traceback objects.[^1]

## Trust

Overall: 0.61 out of 1.
Signals: maintenance 0.93, adoption 0.68, momentum 0.36, community 0.72, backing 0.30, extensibility 0.00.

- last commit 14 days ago
- 49 commits in the last 90 days
- latest release 0.4.1 10 months ago
- 2.5k GitHub stars
- 62 contributors
- accepts sponsorship (Github, Custom)
- backed by The Uncertainty Quantification Foundation

## Alternatives

- [cloudpickle](https://talira.ai/catalog/cloudpickle-3fyjcdsj.md): Pickle Python constructs the standard pickle module can't

## Sources

[^1]: https://github.com/uqfoundation/dill/blob/master/README.md (checked 29 Nov 2026)
[^2]: https://github.com/uqfoundation/dill/blob/master/LICENSE (checked 29 Nov 2026)
