--- id: threadpoolctl version: "3.6.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # threadpoolctl — threadpoolctl License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install threadpoolctl uv add threadpoolctl poetry add threadpoolctl ## Description # Thread-pool Controls [![Build Status](https://github.com/joblib/threadpoolctl/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/joblib/threadpoolctl/actions?query=branch%3Amaster) [![codecov](https://codecov.io/gh/joblib/threadpoolctl/branch/master/graph/badge.svg)](https://codecov.io/gh/joblib/threadpoolctl) 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... ## AI interpretation — verify before relying Inspect and control the thread-pool size of native libraries like BLAS and OpenMP, preventing thread oversubscription in nested parallel workloads. 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. [View on SkillFed](https://skillfed.io/packages/threadpoolctl) · [View on PyPI](https://pypi.org/project/threadpoolctl/)