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.8.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.8-py3-none-any.whl (8.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_parallel-0.1.8.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.8.tar.gz
Algorithm Hash digest
SHA256 825f6cc08486e5429c83ffc5607919c3bf15d2f2071056bba7916e160b345a82
MD5 058d8e136731ebd26f6bfe4a2c4823bf
BLAKE2b-256 9d7509bd5c34db893460203105c2152e395f020d819b4dad09e24713b0e7a57f

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_parallel-0.1.8.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.8-py3-none-any.whl.

File metadata

File hashes

Hashes for scitex_parallel-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 dfb5524117b1eb25f2a253019ac5ce16f40d9ee1466e0798f3ba54b09e93a259
MD5 85c202da6fdd41c7fc21f209f6387072
BLAKE2b-256 12aa888460f01ae276917c809c1116643ba0304ca845f95a110b8f611e3283f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_parallel-0.1.8-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