joblib-stubs
joblib stubs
What it is and what it does
joblib-stubs is a type stub package that teaches static type checkers how to understand joblib's public API. It contains no runtime code—only type annotations and signatures. When installed alongside joblib, type checkers like mypy can now infer correct types for joblib functions like Parallel and delayed, catching type errors at analysis time rather than runtime.
The package is designed for developers who use joblib for parallel computing and want static type safety in their codebase. It supports Python 3.11 through 3.14 and depends only on typing-extensions. The stubs do not cover joblib.externals (bundled cloudpickle and loky), so type checking for those modules remains unavailable.
Use it for:
- Enable mypy or other type checkers to validate joblib usage in a data processing pipeline
- Catch type mismatches in Parallel and delayed calls before runtime
- Improve IDE autocomplete and inline documentation for joblib functions
- Maintain type safety in a large codebase that uses joblib for distributed computation
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for joblib, enabling static type checkers to understand joblib's API and type signatures without runtime code.
Yes, if you use joblib and want static type checking. Install it alongside joblib to enable type checkers to understand joblib's API. The package is lightweight, actively maintained, and has no security vulnerabilities. It imposes no runtime overhead since it contains only type information.
Install
joblib-stubs on PyPI
pip
pip install joblib-stubsuv
uv add joblib-stubspoetry
poetry add joblib-stubsInstalling joblib-stubs
Before you install
Low friction installation with a single lightweight dependency (typing-extensions). Repository is actively maintained with recent commits, though the project is relatively young with modest adoption.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in your own projects.
Quickstart
pip install joblib-stubs
from joblib import Parallel, delayed
results = Parallel(n_jobs=2)(delayed(lambda x: x**2)(i) for i in range(10))
# Type checker now understands joblib's types
Requires joblib to be installed separately for runtime; stubs alone provide no execution capability. Requires Python 3.11 or later.
Verify before relying
- Completeness of type coverage for all joblib modules and functions beyond externals
- Compatibility with type checkers other than mypy (pyright, pyre, etc.)
- Whether stub coverage keeps pace with joblib's own API evolution
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | actively maintained — 209 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 109,577/month — #12,508 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: joblib_stubs-1.5.3.1.20260117-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
diskcache-stubsProvides type hints and stubs for the diskcache…
permissive · top 15,000 on PyPI
scipy-stubsProvides type stubs for the entire SciPy…
permissive · top 5,000 on PyPI
sqlalchemy-stubsProvides type stubs and a mypy plugin to enable…
permissive · top 5,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
types-assertpyProvides type stubs enabling static type…
permissive · top 15,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-greenletProvides type stubs for the greenlet package,…
permissive · top 15,000 on PyPI
types-cffiProvides type stubs for the cffi package,…
permissive · top 5,000 on PyPI
types-typed-astProvides type stubs for the typed-ast package,…
permissive · top 15,000 on PyPI