--- id: scikit-learn-stubs version: "0.0.3" license: MIT license_treatment: permissive maintenance: aging --- # scikit-learn-stubs — scikit-learn stubs from the Microsoft python-type-stubs repository License: permissive · Maintenance: aging · Downloads: 336.3K/mo ## What it is and what it does scikit-learn-stubs is a type stub package that provides type hints for scikit-learn, enabling static type checkers like mypy and pyright to understand scikit-learn's API. Type stubs are metadata files that describe the types of functions, classes, and methods without executing code, allowing developers to catch type errors during development rather than at runtime. The package is a PyPI distribution of stubs originally from Microsoft's Python Type Stubs repository. It has no runtime dependencies and is installed purely to support development-time type checking. The package supports Python 3.9 through 3.13 and carries an MIT license. However, the package is newly released and shows minimal ongoing maintenance, which may affect how current the stubs remain relative to scikit-learn's own API evolution. Use it for: - Enable mypy or pyright to type-check code that calls scikit-learn functions and classes. - Improve IDE autocomplete and inline documentation for scikit-learn in editors that support type stubs. - Catch type mismatches in machine learning pipelines during development before runtime. - Support continuous integration pipelines that enforce static type checking on scikit-learn-dependent code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type stubs for scikit-learn to enable static type checking in projects that use the library. Yes, if you use scikit-learn and want static type checking in your project. Install it as a development dependency. However, verify that the stubs are current for your scikit-learn version, and monitor the repository for updates—the minimal maintenance signal and recent first release suggest this may not track scikit-learn changes closely. The Microsoft repository may be a more actively maintained alternative. ## Install pip install scikit-learn-stubs uv add scikit-learn-stubs poetry add scikit-learn-stubs ## Installing scikit-learn-stubs Before you install: Low friction install with no runtime dependencies. Package is newly released (first release 2025-08-27) and marked as aging after 351 days, with minimal maintenance activity and only 3 repository stars. License in practice: MIT license is permissive and imposes no restrictions on use, modification, or distribution in your own projects. Quickstart: pip install scikit-learn-stubs # Then use with type checker (mypy, pyright, etc.) # in your IDE or CI pipeline for scikit-learn code Requires Python 3.9 or later; type checking tool (mypy, pyright, pylance) must be separately configured to use the stubs. Verify before relying: - Whether stubs are kept in sync with scikit-learn releases given the minimal maintenance signal. - Coverage completeness of the stubs relative to the full scikit-learn API surface. - Whether this package is actively maintained or if the Microsoft repository is the recommended source. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 336.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags scikit-learn type stubs, sklearn type hints, python type checking sklearn, scikit-learn static typing, mypy scikit-learn, type annotations machine learning, type-stubs, static-analysis [View on SkillFed](https://skillfed.io/packages/scikit-learn-stubs) · [View on PyPI](https://pypi.org/project/scikit-learn-stubs/)