Skip to content

Instantly share code, notes, and snippets.

@mp4096
Created July 10, 2017 10:20
Store and load Python objects
import joblib
a = 1
b = "hello"
c = 2.71828
# The `compress` argument is optional;
# 9 is the highest compression level
joblib.dump((a, b, c), "foo.xz", compress=9)
print(joblib.load("foo.xz"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment