Publishing Wasm Wheels#
WebAssembly wheels built by pyodide-build are standard Python wheels — they follow the same packaging format and can be published to PyPI like any other wheel.
Note
PEP 783 The Emscripten/WebAssembly platform tags are standardized by PEP 783.
Publishing to PyPI#
Upload with twine or any standard publishing tool:
twine upload dist/your_package-*.whl
Recommended: or use trusted publishing in GitHub Actions (no API tokens needed):
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
How users install your package#
Once published, Pyodide users can install your package in two ways:
In the browser (via micropip)#
import micropip
await micropip.install("your-package")
micropip fetches the wheel from PyPI and installs it in the running Pyodide environment.
In a Pyodide venv (via pip)#
pyodide venv .venv-pyodide
source .venv-pyodide/bin/activate
pip install your-package
pip resolves the correct pyemscripten_*_wasm32 wheel automatically.
What’s next?#
CI with cibuildwheel — automate building for all platforms
CI without cibuildwheel — GitHub Actions with pyodide build directly