threadpoolctl
threadpoolctl
Install
threadpoolctl on PyPI
pip
pip install threadpoolctluv
uv add threadpoolctlpoetry
poetry add threadpoolctlPackage facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 518 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: threadpoolctl-3.6.0-py3-none-any.whl
About threadpoolctl
from the package's own PyPI description — quoted content, verbatim
Thread-pool Controls Build Status (image) codecov (image)
Python helpers to limit the number of threads used in the threadpool-backed of common native libraries used for scientific computing and data science (e.g. BLAS and OpenMP).
Fine control of the underlying thread-pool size can be useful in workloads that involve nested parallelism so as to mitigate oversubscription issues.
Installation
- For users, install the last published version from PyPI:
bash
pip install threadpoolctl
- For contributors, install from the source repository in developer mode:
bash
pip install -r dev-requirements.txt
flit install --symlink
then you run the tests with pytest:
bash
pytest
Usage
Command Line Interface
Get a JSON description of thread-pools initialized when importing python packages such as numpy or scipy for instance:
``` python -m threadpoolctl -i...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Inspect and control the thread-pool size of native libraries like BLAS and OpenMP, preventing thread oversubscription in nested parallel workloads.
Minimal install friction: pure-Python wheel with zero runtime dependencies and active maintenance (last release 2025-03-13, 431 GitHub stars).
BSD-3-Clause permissive license allows use in most contexts without restriction, including commercial and proprietary projects.
Usage
pip install threadpoolctl
from threadpoolctl import threadpool_limits
with threadpool_limits(limits=1, user_api='blas'):
# Calls to BLAS implementations will be limited to one thread
Verdict: Lightweight, actively maintained utility for controlling thread pools in scientific computing libraries. No security vulnerabilities, permissive license, and zero dependencies make it a safe dependency for projects needing fine-grained parallelism control.
Needs verification
- Performance impact of threadpool limiting on real-world workloads
- Compatibility with all BLAS implementations across different platforms
Similar packages
permissive · top 1,000 on PyPI
limitspermissive · top 1,000 on PyPI
opentelemetry-instrumentation-threadingpermissive · top 1,000 on PyPI
opencensus-contextpermissive · top 1,000 on PyPI
py-spypermissive · top 1,000 on PyPI
multitaskingpermissive · top 1,000 on PyPI
pinotdbpermissive · top 1,000 on PyPI
jsonrefpermissive · top 1,000 on PyPI
typing-inspectionpermissive · top 100 on PyPI
lightgbmunclear · top 1,000 on PyPI