Skip to main content

EasyGPU

Status: 0.0.0 preview — API design validation only.

EasyGPU is a Python wrapper for WebGPU with a built-in FakeGPU that lets you TDD your command-encoding logic without a GPU.

What works in 0.0.0

  • ✅ GPU Protocol (the full interface EasyGPU uses) + configure/get_gpu
  • ✅ FakeGPU — record and assert command-encoding calls (in src/easygpu/), including render_pass_sequence(pass_handle) for per-pass call trees
  • ✅ Buffer, ShaderModule, RenderPipeline, CommandEncoder (+ Adapter, Device, Queue)
  • ✅ Convenience constructors: Buffer.from_data(device, data) (bytes or a float sequence), ShaderModule.from_wgsl(device, *sources)
  • ✅ Render passes work as context managers — with encoder.begin_render_pass(...): auto-calls end()
  • ✅ Spec-aligned enums: BufferUsage/ShaderStage use the WebGPU IDL bit flags (IntFlag), the rest mirror wgpu-native ABI encodings
  • ✅ examples/triangle.py — a triangle example that verifies command encoding via FakeGPU

What does NOT work in 0.0.0

  • ❌ No real GPU backend — the GPU Protocol is the deliverable; the wrappers raise GPUValidationError unless you configure() a fake or real backend
  • ❌ No swapchain / window output, no textures, no compute passes
  • ❌ No runtime dependencies: vertex data is raw bytes (float sequences are struct-packed); the reference numpy upload path is intentionally deferred
  • ❌ WGSL execution (FakeGPU records calls, it does not run shaders)

Quickstart

From source (contributors)

uv sync
uv run pytest                # headless, no GPU needed
uv run python examples/triangle.py

From PyPI (users)

pip install easygpu
python -c "from easygpu.fake_gpu import FakeGPU; print(FakeGPU())"

Note: importing easygpu emits a UserWarning explaining that 0.0.0 is an API preview. That warning disappears in 0.1.0.

Roadmap

  • 0.1.0: real backend behind the GPU Protocol (wgpu/native), keeping the Protocol stable; translate the spec-aligned enums to the backend ABI
  • Later: swapchain + windowed output, textures, compute
  • 0.2.0: compute pipelines + bind groups + samplers
  • 0.3.0: more examples (triangle, compute, multi-pass, instancing etc.)

Project layout

  • src/easygpu/ — library (Protocol seam + wrapper objects + fake_gpu.py)
  • examples/ — runnable examples

Metadata

Release files for EasyGPU 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for EasyGPU 0.0.0
File Size Uploaded
easygpu-0.0.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for EasyGPU 0.0.0
File Interpreter ABI Platform
easygpu-0.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 kB

Release files / easygpu-0.0.0.tar.gz

Download URL easygpu-0.0.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3cf197739195d2196275867a75d91681093415278b0b2b19bd3e0046dadf6516
BLAKE2b-256 checksum
How to use checksums
e4e5629a01c60739a600745fcb4a4e9adfa26278ffa51f7cecbd0677ac6b7ce1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / easygpu-0.0.0-py3-none-any.whl

Download URL easygpu-0.0.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f3b22827d198d7ab25b8a248ef12afe29fa49a44a14646833c6aaff2bedcacd
BLAKE2b-256 checksum
How to use checksums
8b496b27fcc4723e5d8ad01966d812bc07c17d0aa88f7dc99a9559f0c84b853d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

This release

0.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page