skillfed

cloudpickle

Pickler class to extend the standard pickle.Pickler functionality

cloudpickle Permissive license BSD-3-Clause Active 1,935 v3.1.2 released

Install

cloudpickle on PyPI

pip

pip install cloudpickle

uv

uv add cloudpickle

poetry

poetry add cloudpickle

Package 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Scientific/EngineeringTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Distributed Computing

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.
serialize lambda functions pythonpickle interactive functionsdistributed computing serializationcluster code shippingextended pickle supportserialize dynamic python objectsremote execution serialization

Similar packages