WebGPU from Python#

Interactive 3D visualization and GPU compute in Jupyter notebooks.

The webgpu package gives Python direct access to the browser’s WebGPU API — a modern, cross-platform GPU interface. It is designed for scientific applications (finite elements, vector fields, point clouds) but exposes the full WebGPU pipeline so you can build any GPU-accelerated visualization or computation.

Key features#

  • Full WebGPU access — write WGSL shaders directly, create custom render and compute pipelines from Python.

  • Scientific renderers — built-in support for instanced shapes, triangle meshes, vector fields, colormaps, clipping planes, and labels.

  • Jupyter integrationDraw(renderer) produces an interactive 3D canvas in any notebook cell with rotate/pan/zoom.

  • Export to HTML — scenes serialize to standalone HTML files with a built-in JavaScript WebGPU engine. No Python runtime needed in the browser.

  • Compute shaders — run WGSL compute kernels on GPU buffers from Python.

  • Selection & picking — click objects in the canvas and react in Python.