Cloudpickle

3.1.2 · active · verified Sat Mar 28

Cloudpickle extends the standard functionality of the pickle module, allowing the serialization of Python objects that are not natively serializable. Current version is 3.1.2, released regularly with bug fixes and features.

Warnings

Install

Imports

Quickstart

A simple quickstart example demonstrating serialization and deserialization.

import cloudpickle
import os

model = {'name': 'example_model'}

# Serialize
serialized_model = cloudpickle.dumps(model)

# Deserialize
loaded_model = cloudpickle.loads(serialized_model)
print(loaded_model)

view raw JSON →