Joblib: Lightweight pipelining with Python functions

1.5.3 · active · verified Sat Mar 28

Joblib is a set of tools for lightweight pipelining in Python, providing transparent disk-caching of functions and easy parallel computing. Current version: 1.5.3. Release cadence: Regular updates with recent releases in 2025 and 2026.

Warnings

Install

Imports

Quickstart

Example of using Joblib's Memory class for caching a function's output.

from joblib import Memory

# Set up a cache directory
location = 'your_cache_dir'
mem = Memory(location, verbose=1)

# Define a function to cache
import numpy as np

def square(x):
    return np.square(x)

# Cache the function
cached_square = mem.cache(square)

# Use the cached function
result = cached_square(np.array([1, 2, 3]))
print(result)

view raw JSON →