scitex-parallel
Thread/process pool parallel execution utilities — `map` with tqdm, auto CPU count.
Full Documentation · uv pip install scitex-parallel[all]
Problem and Solution
| # | Problem | Solution |
|---|---|---|
| 1 | Rewritten map loops — concurrent.futures is low-level, so every project rewrites map-with-progress-bar from scratch |
stx.parallel.run(func, args) — drop-in map with tqdm, auto CPU-count; 1-liner for I/O-bound workloads (HTTP, file reads, API calls) |
| 2 | Heavyweight defaults — joblib.Parallel is process-based by default, overkill for threaded I/O |
Thread pool default — thread-based with no dep beyond stdlib + tqdm; the right tool for the 80% case |
Quick Start
from scitex_parallel import run
results = run(my_func, [(x,) for x in items], n_jobs=4)
Demo
flowchart LR
A[items list] --> B[run func, items, n_jobs=8]
B --> T1[thread 1]
B --> T2[thread 2]
B --> Tn[thread N]
T1 & T2 & Tn --> C[tqdm progress bar]
C --> D[results list]
Figure 1. Fan-out/fan-in: one call maps items across a thread pool with a live progress bar, then gathers results in order.
from scitex_parallel import run
urls = ["https://api.example.com/{}".format(i) for i in range(100)]
results = run(fetch_url, [(u,) for u in urls], n_jobs=8, desc="Fetching")
Fetching: 100%|████████████| 100/100 [00:04<00:00, 22.3 it/s]
Installation
uv pip install "scitex-parallel[all]"
Through the umbrella: uv pip install "scitex[parallel]". Requires Python ≥ 3.10.
Per-extra installs
| Extra | Pulls in |
|---|---|
dev |
pytest, pytest-cov, ruff, scitex-dev |
docs |
sphinx, sphinx-rtd-theme, myst-parser, sphinx-copybutton, sphinx-autodoc-typehints |
Architecture
flowchart LR
U["user code"] --> R["run(): public API in __init__.py"]
R --> P["ThreadPoolExecutor (n_jobs)"]
P --> T["_run.py worker: func(*args)"]
T --> Q["tqdm progress bar"]
Q --> L["ordered results list"]
Figure 2. Module layout: the public run() fans tuple-args out to pool workers and streams progress back through tqdm.
1 Interfaces
Python API
from scitex_parallel import run
# I/O-bound parallel map with tqdm progress bar.
results = run(fetch_url, [(u,) for u in urls], n_jobs=8, desc="Fetching")
# Tuple-arg form for multi-arg functions.
results = run(my_func, [(a, b) for a, b in zip(xs, ys)], n_jobs=4)
Part of SciTeX
scitex-parallelis part of SciTeX. Install via the umbrella withpip install scitex[parallel]to use asscitex.parallel(Python) orscitex parallel ...(CLI).
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
License
AGPL-3.0
Metadata
Release files for scitex-parallel 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scitex_parallel-0.1.9.tar.gz | 8.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scitex_parallel-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 MB
Release files / scitex_parallel-0.1.9.tar.gz
| Download URL | scitex_parallel-0.1.9.tar.gz |
|---|---|
| Size | 8.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80944aa623bc1d76d0999d1f4c93dfcd40a6b3b016220c4763a84ff43425f4ca
|
|
BLAKE2b-256 checksum How to use checksums |
66a895f356a376b159795c1a5b4741b68253709404d0a4c0fbf4588903d020d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / scitex_parallel-0.1.9-py3-none-any.whl
| Download URL | scitex_parallel-0.1.9-py3-none-any.whl |
|---|---|
| Size | 8.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22b81f6d2e2dcd2943144acfa78609a1199872bf193014b1a0c0e15e5774cd74
|
|
BLAKE2b-256 checksum How to use checksums |
eccb73577eba9875086cbb726c41dcda5beb5e1384601ad371b1f26708f7ad1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|