Skip to main content

scitex-parallel

SciTeX

Thread/process pool parallel execution utilities — `map` with tqdm, auto CPU count.

Full Documentation · uv pip install scitex-parallel[all]

pypi python docs License: AGPL v3

tests cov


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-parallel is part of SciTeX. Install via the umbrella with pip install scitex[parallel] to use as scitex.parallel (Python) or scitex parallel ... (CLI).

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. 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


SciTeX

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)

Source distribution for scitex-parallel 0.1.9
File Size Uploaded
scitex_parallel-0.1.9.tar.gz 8.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for scitex-parallel 0.1.9
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page