Python bindings for W3C WebNN specification
Project Links
Meta
Author: Tarek Ziade
Requires Python: >=3.10
Classifiers
Development Status
- 4 - Beta
Intended Audience
- Developers
- Science/Research
License
- OSI Approved :: Apache Software License
Operating System
- OS Independent
Programming Language
- Python :: 3
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Rust
Topic
- Scientific/Engineering :: Artificial Intelligence
pywebnn
Python bindings for the W3C WebNN API, powered by rustnn.
Install
pywebnn is available on PyPI:
pip install pywebnn
Docs
Full documentation is published on GitHub Pages:
https://rustnn.github.io/pywebnn/
Quick Start
import numpy as np
import webnn
ml = webnn.ML()
context = ml.create_context(device_type="cpu")
builder = context.create_graph_builder()
x = builder.input("x", [2, 3], "float32")
y = builder.input("y", [2, 3], "float32")
out = builder.relu(builder.add(x, y))
graph = builder.build({"output": out})
result = context.compute(
graph,
{
"x": np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32),
"y": np.array([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]], dtype=np.float32),
},
)
print(result["output"])
Links
0.5.12
May 04, 2026
0.5.11
Dec 29, 2025
0.5.10
Dec 29, 2025
0.5.9
Dec 29, 2025
0.5.2
Dec 28, 2025
0.5.1
Dec 24, 2025
0.5.0
Dec 24, 2025
0.4.0
Dec 16, 2025
0.3.0
Dec 14, 2025
0.2.0
Dec 08, 2025
0.1.0
Dec 05, 2025