Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywebnn-0.5.12.tar.gz (388.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pywebnn-0.5.12-cp312-cp312-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.12Windows x86-64

pywebnn-0.5.12-cp312-cp312-manylinux_2_34_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

pywebnn-0.5.12-cp312-cp312-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file pywebnn-0.5.12.tar.gz.

File metadata

  • Download URL: pywebnn-0.5.12.tar.gz
  • Upload date:
  • Size: 388.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pywebnn-0.5.12.tar.gz
Algorithm Hash digest
SHA256 4b73f3d7305fff78e7b4360a9e9f67eac4943cbb96a33950c517c6c59f754dfe
MD5 4a813ef02b6a203bd907eb4c3e919b61
BLAKE2b-256 8547843a7747c95b9c5c35a40c9256e546c7c86ea62b3411116c9f91fd03d86c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywebnn-0.5.12.tar.gz:

Publisher: publish.yml on rustnn/pywebnn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pywebnn-0.5.12-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pywebnn-0.5.12-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pywebnn-0.5.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e3d84cc4645a28e7d3d02a2e2d475d2a4a8f0d9267697ceab64105f5f0803c09
MD5 45ebefb40b92f454e1cf01a5ce7500cb
BLAKE2b-256 afa3c5fb2fe8d8824b4f4563952eecf1d18846997eb92898f922b9b3bc8fc54d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywebnn-0.5.12-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on rustnn/pywebnn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pywebnn-0.5.12-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pywebnn-0.5.12-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8462ef8e7dc3d4534cbb0f77c6a5a0f3fe9419eecbe30ecb4f025031155485d9
MD5 e687a0312f9cc75c7db21d9d6c1ab65b
BLAKE2b-256 9ce924a4ad61b423ae267d9900df31377dbe6946c7e1a7e0748e0c8f01a7fcd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywebnn-0.5.12-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on rustnn/pywebnn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pywebnn-0.5.12-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pywebnn-0.5.12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd464be72f8616deb691d8086ad8a69071c30a4c5bf1dec5acaae4f34a22c837
MD5 5ae7825e7e700206e44146f648025ed8
BLAKE2b-256 61662ca8928e1add7d05db8bdf92933605a327d451f7298542c110e0aa472880

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywebnn-0.5.12-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on rustnn/pywebnn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.12 This release

4 files

0.5.11

5 files

0.5.10

5 files

0.5.9

5 files

0.5.2

6 files

0.5.1

6 files

0.5.0

6 files

0.4.0

6 files

0.3.0

7 files

0.2.0

7 files

0.1.0

7 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page