Skip to main content

🧩 wasm-multiprocessing

multiprocessing.Pool for Pyodide: same API, Web Workers underneath.

🔗 Live Demo · Source

Stdlib multiprocessing cannot run under WebAssembly (no fork, no -pthread). wasm-multiprocessing provides stdlib-shaped Pool/AsyncResult over a pool of Pyodide Web Workers, so existing Pool-based code runs after changing one import line, within the limits below.

Usage

import pyodide_pool

await pyodide_pool.create_pool(pool_size=4)  # start the worker pool

# was: from multiprocessing import Pool
from wasm_multiprocessing import Pool

with Pool(4) as pool:
    counts = await pool.amap(count_primes, ranges)  # portable everywhere
    # or, where JSPI is available, block for real:
    # counts = pool.map(count_primes, ranges)
  • Async-native everywhere — amap, astarmap, aapply, … .
  • Blocking where safe — map/starmap/apply/join and AsyncResult.get/wait truly block where JSPI stack switching is available; elsewhere they raise a RuntimeError naming the async replacement.
  • Honest limits — fork-shaped APIs (Process, Queue, Manager, shared memory, locks) raise NotImplementedError: WebAssembly workers share nothing.

Built on pyodide-pool, which handles cloudpickle transport, package mirroring, and the JS bridge. Like pyodide-pool, it runs only in the driver Pyodide instance.

Documentation

License

MIT

Metadata

Release files for wasm-multiprocessing 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wasm-multiprocessing 0.1.1
File Size Uploaded Provenance Actions
wasm_multiprocessing-0.1.1.tar.gz 8.0 kB Without provenance Details for wasm_multiprocessing-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wasm-multiprocessing 0.1.1
File Interpreter ABI Platform Actions
wasm_multiprocessing-0.1.1-py3-none-any.whl Python 3 none any Details for wasm_multiprocessing-0.1.1-py3-none-any.whl

Total release size: 17.0 kB

Release files / wasm_multiprocessing-0.1.1.tar.gz

Download URL wasm_multiprocessing-0.1.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
59b13caaa8e8ecfe8b532deb968ed589500523223199bbf6ae40e270048305a9
BLAKE2b-256 checksum
How to use checksums
98b21430cfa2da1a243d67e2a7915947c3f60275bb999b7fea4b83b883ecd43b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / wasm_multiprocessing-0.1.1-py3-none-any.whl

Download URL wasm_multiprocessing-0.1.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1604d04d82b170de7eb2e5be96e23cb7f1ac138511478c3c4b49f92544f79ef5
BLAKE2b-256 checksum
How to use checksums
8a4c05a6927d0614b67a9d1dae4e55f212b3d7a128ee99ad7be7e36b395ed89f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for wasm-multiprocessing 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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