Skip to content

Native interfaces. Python apps.

gpyui brings Longbridge's GPUI Kit to Python through a PyO3 extension. Compose your desktop app, bind application state and handle events in Python. GPUI and Kit retain the native window, rendering, focus, editing and component state in Rust.

Build your first app Explore 80 components

Native trading workspace with a simulated market stream

This is a real native window, recorded on Linux. The trading example streams simulated quotes and trades, fills paper orders through async Python callbacks, and updates native charts and tables.

Write the app in Python

from gpyui import Application, Button, Column, Label, TextInput

app = Application(title="Hello", width=480, height=300)
with app, Column():
    name = TextInput(placeholder="Your name")
    greeting = Label("Choose Greet")
    Button("Greet", on_click=lambda: setattr(greeting, "text", f"Hello, {name.value}!"))
app.run()

Native appearance

Use Kit’s macOS Classic, Windows/Fluent and shadcn-inspired light/dark presets, or customize a semantic palette. Switch themes without losing editor state. Explore the theme previews and live example.

Explore the library

Start here What you can build
Layouts Columns, rows, surfaces, scrolling and native resizable panes
Inputs and selection Native text editing, choice controls, searchable dropdowns and bindings
Data and charts Native tables, trees and five plot families
Overlays Native dialogs, sheets, popups and hover content
Content and feedback Native rich text, messages, status and progress

Every catalog entry includes a real native preview, properties and a runnable Python example. The documentation search indexes all component names.

Current scope

gpyui is in early development with 80 controls on main and native notifications. Version 0.6.1 includes Image, expanded window controls, exact macOS Classic themes, keyed tables, richer inputs, MultiSelect and CommandPalette. Version 0.7.0 updates the native backend to Kit 0.11.0 / GPUI 0.3.14. Version 0.8.0 adds application-wide layout direction. The Python catalog still covers a subset of the Kit APIs. Table uses native virtualization; List currently renders all items. Linux/X11 is tested, and macOS/Windows wheels have native smoke tests. One window and dynamic children and visibility are supported, preserving native editing state. The package is available on PyPI and licensed under MIT. Coverage lists the remaining specialized Kit APIs.

Sources and evidence

The architecture was checked against the implementations of NiceGUI, Flet, GPUI and GPUI Kit. Read the source-grounded decisions, pinned revisions and native validation.

Repository · GPUI source · GPUI Kit source