--- id: wgpu version: "0.32.0" license: BSD 2-Clause License Copyright (c) 2019-2023, Almar Klein, Korijn van Golen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted… (full text in the JSON record) license_treatment: permissive maintenance: active --- # wgpu — WebGPU for Python License: permissive · Maintenance: active · Downloads: 129.1K/mo ## What it is and what it does wgpu-py is a Pythonic wrapper around wgpu-native, exposing the WebGPU API—a modern, higher-level GPU graphics standard designed to replace OpenGL. It abstracts over Vulkan, Metal, DX12, and OpenGL backends, providing a unified interface for GPU compute and graphics across platforms. The library ships with precompiled binaries for Windows, Linux (x86 and ARM), and macOS (Intel and M1), making installation straightforward on supported systems. The package is used as the foundation for rendering engines like pygfx and supports both synchronous (blocking) and asynchronous function variants, allowing integration with asyncio or Trio. Test coverage is near complete, and the API surface is mature enough to power production visualization and compute libraries. Developers can render to screen via rendercanvas, which auto-detects available GUI backends (GLFW, Qt, wxPython, Jupyter), or use wgpu purely for headless GPU compute. Use it for: - Build modern GPU-accelerated visualization and rendering engines as a foundation (e.g., pygfx) - Implement GPU compute kernels and data-parallel algorithms without low-level graphics API complexity - Create cross-platform graphics applications that run on Windows, Linux, and macOS with a single codebase - Embed GPU rendering in Qt/wxPython/Jupyter applications via rendercanvas integration - Port WebGPU JavaScript code to Python while maintaining API compatibility ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. wgpu-py provides a Python binding to WebGPU, a modern GPU graphics API that serves as the successor to OpenGL, enabling GPU compute and graphics rendering across Windows, Linux, and macOS. Yes, if you need modern GPU graphics or compute in Python and can target Python 3.11+. The library is actively maintained, permissively licensed, has no known vulnerabilities, and offers a stable, well-tested API suitable for production visualization and compute work. Install friction is moderate due to platform-specific binaries, but precompiled wheels handle most systems. Not suitable if you require Python <3.11 or need to support older GPU drivers. ## Install pip install wgpu uv add wgpu poetry add wgpu ## Installing wgpu Before you install: Medium install friction due to platform-specific binary wheels (Windows, Linux x86/aarch64, macOS Intel/ARM) and three runtime dependencies including cffi and rendercanvas. Actively maintained with a release 26 days old; requires Python 3.11+. License in practice: BSD 2-Clause License permits commercial and private use with minimal restrictions; you must retain copyright notice and disclaimer in distributions. No copyleft obligations. Quickstart: pip install wgpu rendercanvas import wgpu from rendercanvas.auto import RenderCanvas, loop # Access full WebGPU API via wgpu namespace device = await wgpu.gpu.request_adapter().request_device() Requires Python 3.11+. GPU hardware and appropriate drivers (Vulkan, Metal, DX12, or OpenGL) must be available on the target system. Verify before relying: - Whether async functions work reliably with standard asyncio/trio patterns in production - Performance characteristics compared to direct wgpu-native or other GPU frameworks - Stability of the WebGPU spec implementation as the standard continues to evolve ## Package facts - License: BSD 2-Clause License Copyright (c) 2019-2023, Almar Klein, Korijn van Golen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 129.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags webgpu python binding, gpu graphics api python, modern gpu compute, vulkan metal dx12 wrapper, gpu rendering framework, wgpu native python, cross-platform gpu api, gpu-graphics, webgpu, cross-platform [View on SkillFed](https://skillfed.io/packages/wgpu) · [View on PyPI](https://pypi.org/project/wgpu/)