Skip to main content

Thread/process pool parallel execution utilities

Project description

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 tests cov License: AGPL v3


Problem and Solution

# Problem Solution
1 concurrent.futures is low-level — users rewrite "map-with-progress-bar" every project 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 joblib.Parallel is heavyweight + process-based by default — overkill for threaded I/O Thread-based, no dep beyond stdlib + tqdm — right tool for the 80% case

Installation

pip install scitex-parallel

Quick Start

from scitex_parallel import run

results = run(my_func, items, n_jobs=4)

1 Interfaces

Python API
from scitex_parallel import run

# I/O-bound parallel map with tqdm progress bar.
results = run(fetch_url, 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)

Architecture

scitex_parallel/
├── _run.py               ← `run(func, args, n_jobs=…)` thread-pool map
├── _progress.py          ← tqdm wiring (auto desc, position-safe)
├── _cpu.py               ← auto CPU-count detection
└── __init__.py           ← public surface

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]
from scitex_parallel import run

urls = ["https://api.example.com/{}".format(i) for i in range(100)]
results = run(fetch_url, urls, n_jobs=8, desc="Fetching")
Fetching: 100%|████████████| 100/100 [00:04<00:00, 22.3 it/s]

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scitex_parallel-0.1.7.tar.gz (8.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_parallel-0.1.7-py3-none-any.whl (8.2 MB view details)

Uploaded Python 3

File details

Details for the file scitex_parallel-0.1.7.tar.gz.

File metadata

  • Download URL: scitex_parallel-0.1.7.tar.gz
  • Upload date:
  • Size: 8.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_parallel-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e7b7a388837776812367298b4d3a768dea441b419a36a775a5ff3cc09213a778
MD5 37fec07c6459c7f482f7385d451464e9
BLAKE2b-256 232e31e45f820ffe51f8ffe82f5499253521fe8e049bac6e6467526394b26ced

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_parallel-0.1.7.tar.gz:

Publisher: pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-parallel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_parallel-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for scitex_parallel-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4b56a4474b20cbfba29c8a16a6763923af4435f88cf589b06f735ba565b9b08b
MD5 af57e4930f98665a779a581bfea287c5
BLAKE2b-256 2d9adaf67a647c520056601a6e64bbeb3952f6871d47be200247a36d477894e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_parallel-0.1.7-py3-none-any.whl:

Publisher: pypi-publish-and-github-release-on-tag.yml on ywatanabe1989/scitex-parallel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page