gpyui
Build native desktop applications in Python with GPUI Kit.
gpyui is a Python UI toolkit for apps, tools and dashboards. Compose layouts, bind state and handle events in Python, using Longbridge's GPUI Kit components. The Rust backend, powered by GPUI, handles native windows, rendering and text editing.
Documentation · Component catalog · Examples · Releases
A real native window built entirely through the Python API. The trading dashboard example includes simulated quotes, streaming charts and async paper orders. See the documentation for the animated walkthrough.
Why gpyui?
- Native components: 72 Python controls spanning inputs, tables, charts, navigation, dialogs and feedback, backed by GPUI Kit.
- Python composition: build layouts with
Column,Row, containers and context managers, or pass an explicit tree of controls. - State binding: connect application state to text, inputs and selection
controls with
Stateand bindings. - Async events: use regular functions or
async defcallbacks; property changes are queued and batched for native updates. - Shared commands: use the same Python action from buttons, nested menus and platform-aware keyboard shortcuts.
- Native themes: macOS, Windows/Fluent and shadcn-inspired light/dark presets, custom palettes and live switching that preserves editor state.
Installation
Requires CPython 3.12+. On macOS 12+ and Windows, install from PyPI:
uv init my-app
cd my-app
uv add gpyui
In an existing uv project, just run uv add gpyui. Alternatively, use
pip install gpyui in a virtual environment. Native wheels are available for
Intel/x64 and ARM64; Windows ARM64 is tested with Python 3.13+.
On Linux, install the matching prebuilt wheel from GitHub Releases. Linux wheels use system X11, font and Vulkan libraries and are currently distributed separately from PyPI. See the installation guide for runtime dependencies and source builds. Installing a wheel requires no Rust compiler.
Your first app
Save this as hello.py:
from gpyui import Application, Button, Column, Label, TextInput
app = Application(title="Hello, gpyui", width=480, height=300, theme="light")
with app, Column().style(gap=12, padding=24):
name = TextInput(placeholder="Your name")
greeting = Label("Enter a name and choose Greet")
def greet():
greeting.text = f"Hello, {name.value or 'world'}!"
Button("Greet", variant="primary", on_click=greet)
app.run()
Run uv run python hello.py (or python hello.py with pip). Clicking the native
button runs your Python callback and updates the label. Explore
layouts,
state binding and
async events for larger apps.
Documentation and examples
Choose a native preset with Application(theme=Theme("macos")) or
Theme("windows", mode="dark"). Customize colors, corner radii and typography;
switch a running app by assigning app.theme. These are styles for Kit controls,
with platform-owned window decorations. See themes and native previews
and the appearance example.
The documentation includes a visual catalog with real native previews, properties, events and runnable examples for every control, plus guides for styling, application lifecycle and release builds.
Try the trading dashboard, notes editor, component gallery or async binding example.
Agent skills
Give your coding agent the Python API, component contracts, async recipes and native desktop design guidance:
npx skills add gtrefalt/gpyui --skill gpyui --skill gpyui-design-guides
Inspired by GPUI Kit's skills, these skills cover the Python bindings and their current limits. See installation and usage, including manual installation for Codex. Python dependencies use uv; the command above installs agent instructions.
Project status
gpyui is in early development. The component catalog has initial Python wrappers; specialized Kit APIs are still being exposed. Applications currently use one window with dynamic children and visibility. Existing controls retain their native identity and editing state when moved or hidden. See the coverage and roadmap for supported features and planned work.
Release wheels are tested on Linux, macOS and Windows across x64 and ARM64. Linux/X11 has native interaction tests; macOS and Windows have native window, state and lifecycle smoke tests. See release support for the platform and Python matrix.
Contributing
Issues and pull requests are welcome. Start with the contributor guide for source setup, Ruff, ty, Just and Lefthook, and the architecture for design decisions and pinned upstream dependencies.
License and acknowledgements
gpyui is available under the MIT License. GPUI and GPUI Kit make its native backend possible. The Python API also draws on composition and event patterns from NiceGUI and Flet.
Dependencies retain their own licenses. Distributions include third-party notices.
Metadata
Release files for gpyui 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gpyui-0.4.0.tar.gz | 2.2 MB | Without provenance | Details for gpyui-0.4.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| gpyui-0.4.0-cp312-abi3-win_arm64.whl | CPython 3.12 | abi3 | Windows ARM64 | Details for gpyui-0.4.0-cp312-abi3-win_arm64.whl |
| gpyui-0.4.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for gpyui-0.4.0-cp312-abi3-win_amd64.whl |
| gpyui-0.4.0-cp312-abi3-macosx_12_0_x86_64.whl | CPython 3.12 | abi3 | macOS 12.0+ x86-64 | Details for gpyui-0.4.0-cp312-abi3-macosx_12_0_x86_64.whl |
| gpyui-0.4.0-cp312-abi3-macosx_12_0_arm64.whl | CPython 3.12 | abi3 | macOS 12.0+ ARM64 | Details for gpyui-0.4.0-cp312-abi3-macosx_12_0_arm64.whl |
Total release size: 44.1 MB
Release files / gpyui-0.4.0.tar.gz
| Download URL | gpyui-0.4.0.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd7d031192367712bd2b9e622e17376456fdff02bbe04f5e183f1e613fd3aed4
|
|
BLAKE2b-256 checksum How to use checksums |
e91864f72fc6967a924a7d676ea4d3933d9f860ea395a4e2d7ab55f74d862b99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gpyui-0.4.0-cp312-abi3-win_arm64.whl
| Download URL | gpyui-0.4.0-cp312-abi3-win_arm64.whl |
|---|---|
| Size | 11.0 MB |
| Tags | CPython 3.12 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
cb520d524c11a4511c149d126b94ad965fbef35af122c51bec1da1a890e97452
|
|
BLAKE2b-256 checksum How to use checksums |
f99cbd1d20c4dcf8df51bfe78dbddfc36d2b4a30f0e2dd930be3757c959d42d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gpyui-0.4.0-cp312-abi3-win_amd64.whl
| Download URL | gpyui-0.4.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
29762f2a84cc42b676909991dcd3d5154229656083cf0062e801d3dd43c346d5
|
|
BLAKE2b-256 checksum How to use checksums |
3ca48d1c89af32806a26c742d370078f71ebf4c0d4cc349ab437972fc708632c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gpyui-0.4.0-cp312-abi3-macosx_12_0_x86_64.whl
| Download URL | gpyui-0.4.0-cp312-abi3-macosx_12_0_x86_64.whl |
|---|---|
| Size | 9.8 MB |
| Tags | CPython 3.12 abi3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
673603265d8db9e41d2122cc30d95072f18911bde588968b2d4b85c8acf2e36b
|
|
BLAKE2b-256 checksum How to use checksums |
49a614980a641607207eb64ff19333c7a5cd4cd179ff7a7d5b07d301fddaf7ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gpyui-0.4.0-cp312-abi3-macosx_12_0_arm64.whl
| Download URL | gpyui-0.4.0-cp312-abi3-macosx_12_0_arm64.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.12 abi3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7b109c11b097123f7dd6010f4c9e4980ed2eb17a45ff4af2668ac7b731d37cd7
|
|
BLAKE2b-256 checksum How to use checksums |
2dd452cd771bdc49d766e0027c5c16422ea855b94519ecd3d2dc1b73d4d1797b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for gpyui 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.