Skip to main content

🐍⚡ pyodide-pool

Run Python callables and dask graphs in parallel on a pool of Pyodide Web Workers.

🔗 Live Demo · Source

A single Pyodide interpreter is strictly single-threaded (no -pthread, no fork), so parallelism means many interpreters. pyodide-pool is the driver-side Python API for a pool of Web Workers (browser) or worker_threads (Node), each hosting its own Pyodide interpreter:

  • submit — run one cloudpickled call on a worker and await its result.
  • compute / get — an async dask scheduler that executes dask.delayed / dask.bag / dask-array graphs in parallel on the pool.
  • Package mirroring — packages loaded in the driver (e.g. numpy) are installed on each worker on first use.
  • Remote errors — the original Python exception is re-raised on the driver with the worker traceback chained.

The package runs only in the driver Pyodide instance; workers never install it. It is async-first: blocking the driver would starve the event loop the pool lives on.

Usage

import dask
import pyodide_pool

# In JupyterLite: import the JS bundle and start 4 nested workers
pool = await pyodide_pool.create_pool(pool_size=4)

value = await pyodide_pool.submit(fn, *args, **kwargs)  # one remote call
total = await pyodide_pool.compute(dask.delayed(sum)([...]))  # dask collections

create_pool loads the self-contained JS bundle from the JupyterLite site by default; pass js_url= to load it from elsewhere. A web app that embeds Pyodide can instead create the JS PyodidePool itself and register it with pyodide.registerJsModule('js_pyodide_pool', { pool }).

Install pyodide-pool[dask] for compute / get.

For the multiprocessing-style API, see wasm-multiprocessing.

Documentation

License

MIT

Metadata

Release files for pyodide-pool 0.1.2

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

Source distribution (sdist)

Source distribution for pyodide-pool 0.1.2
File Size Uploaded Provenance Actions
pyodide_pool-0.1.2.tar.gz 18.4 kB Without provenance Details for pyodide_pool-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyodide-pool 0.1.2
File Interpreter ABI Platform Actions
pyodide_pool-0.1.2-py3-none-any.whl Python 3 none any Details for pyodide_pool-0.1.2-py3-none-any.whl

Total release size: 33.0 kB

Release files / pyodide_pool-0.1.2.tar.gz

Download URL pyodide_pool-0.1.2.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
745499a2b9f6fdf9c618b09d8c206eb7f3e0f713c25e4124abc279dd8299c92e
BLAKE2b-256 checksum
How to use checksums
f15f29d180f6ac5b5f5f76e178d69497814a0b1cbffb92b3d2c221de9187d78b
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 / pyodide_pool-0.1.2-py3-none-any.whl

Download URL pyodide_pool-0.1.2-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de73d030f2c91f0219c14d9e4a4c4fcab4e7d3f87441afc53018117ba6b775bc
BLAKE2b-256 checksum
How to use checksums
536d4ec3252dbd2dc6d1e6d125b5369b814d0d2c028402bca5248590ba5a6b4f
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 pyodide-pool 0.1.2

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.

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