cloudpickle
Pickler class to extend the standard pickle.Pickler functionality
Install
cloudpickle on PyPI
pip
pip install cloudpickleuv
uv add cloudpicklepoetry
poetry add cloudpicklePackage facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 283 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: cloudpickle-3.1.2-py3-none-any.whl
About cloudpickle
from the package's own PyPI description — quoted content, verbatim
cloudpickle
Automated Tests (image) codecov.io (image)
cloudpickle makes it possible to serialize Python constructs not supported
by the default pickle module from the Python standard library.
cloudpickle is especially useful for cluster computing where Python
code is shipped over the network to execute on remote hosts, possibly close
to the data.
Among other things, cloudpickle supports pickling for lambda functions
along with functions and classes defined interactively in the
__main__ module (for instance in a script, a shell or a Jupyter notebook).
Cloudpickle can only be used to send objects between the exact same version of Python.
Using cloudpickle for long-term object storage is not supported and
strongly discouraged.
Security notice: one should only load pickle data from trusted sources as
otherwise pickle.load can lead to arbitrary code...
Read as markdown · JSON record · Source repository · Homepage
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 Python objects—including lambda functions, locally-defined functions, and classes—that the standard pickle module cannot handle, enabling code and data to be shipped across networks for distributed computing.
Low friction: pure-Python wheel with zero runtime dependencies and active maintenance (last commit 2026-08-06, 283 days since latest release). Supports Python 3.8–3.14 and PyPy.
BSD-3-Clause (permissive): you may use, modify, and distribute cloudpickle freely in commercial and private projects provided you include the license text and do not hold the authors liable.
Usage
pip install cloudpickle
import cloudpickle
import pickle
squared = lambda x: x ** 2
pickled = cloudpickle.dumps(squared)
restored = pickle.loads(pickled)
print(restored(2)) # 4
Objects must be unpickled in the exact same Python version they were pickled in; cloudpickle is not suitable for long-term storage.
Verdict: Mature, well-maintained library (Production/Stable, 1935 GitHub stars, active repo) with zero known vulnerabilities and no dependencies. Essential for distributed computing workflows that need to serialize dynamic Python code. The security notice about only loading from trusted sources applies to all pickle usage, not a cloudpickle-specific issue.
Needs verification
- Whether the 283-day gap since 3.1.2 reflects a stable release cycle or slower maintenance cadence.
- Real-world compatibility edge cases when pickling by value in complex module hierarchies.
Similar packages
permissive · top 1,000 on PyPI
tblibpermissive · top 1,000 on PyPI
pysparkpermissive · top 1,000 on PyPI
logurupermissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlpermissive · top 1,000 on PyPI
srslypermissive · top 1,000 on PyPI
jupyterlabpermissive · top 1,000 on PyPI
notebookpermissive · top 1,000 on PyPI
nbformatpermissive · top 1,000 on PyPI
orjsoncopyleft · top 1,000 on PyPI