skillfed

joblib-stubs

joblib stubs

joblib-stubs v1.5.3.1.20260117 109.6K downloads/30d#12,508 on PyPI10
Permissive license MIT Active released

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-stubs

uv

uv add joblib-stubs

poetry

poetry add joblib-stubs

Installing 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

Development Status :: 4 - BetaProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTyping :: Stubs Only

Tags

joblib type stubsjoblib type hintsstatic type checking joblibjoblib typing supporttype annotations for joblibjoblib mypy stubsjoblib type checker support
type-stubsstatic-analysis

More Software Development packages