Skip to main content

Python bindings for Pane, a modern minimalist Windows UI engine built on WPF

Project description

pane

Python bindings for Pane — a modern, minimalist Windows UI engine built on WPF. Build real native Windows app UIs from Python: buttons, checkboxes, sliders, text input, tabs, live light/dark theming and accent-color switching, all with a single custom-chrome window.

The engine itself is C#/WPF; this package drives it in-process via pythonnet, so widgets are the real native controls, not a re-implementation.

Windows only (WPF has no cross-platform equivalent). Requires the free .NET 8 Desktop Runtime — not the SDK, just the runtime.

Install

pip install pane-ui

Quick start

import pane

def build(window):
    window.Content = pane.stack(
        pane.text("Hello from Python", size="title", bold=True),
        pane.button("Click me", style="primary", on_click=lambda: print("clicked!")),
        pane.checkbox("Enable notifications", checked=True),
        spacing=12,
        margin=24,
    )

pane.run(build, title="My App")

Run the full widget gallery from the source repo for a tour of everything available: python examples/gallery.py.

Widgets

button, checkbox, radio_button, toggle_switch, text_box, password_box, progress_bar, slider, combo_box, list_box, nav_list, tab_control, expander, group_box, separator, text, plus set_tooltip / set_context_menu helpers.

Layout

stack(*children, orientation=, spacing=, margin=), grid(children, rows=, columns=), card(*children), sidebar(*children), scroll(child).

Theming

pane.set_theme("light")        # or "dark"
pane.toggle_theme()
pane.set_accent("#4C82F7")     # hex string or (r, g, b) tuple
pane.reset_accent()

Every widget re-themes live, mid-run, no restart needed.

Events

Callbacks adapt to whatever you write - zero args or one:

pane.button("Save", on_click=lambda: print("saved"))
pane.slider(on_change=lambda value: print(value))

Threading

pane.run(builder) builds the window on a dedicated UI thread and blocks until it's closed. Build your widget tree inside builder. To update the UI later from another thread (a timer, a background task), use pane.invoke(fn) to marshal back onto the UI thread.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pane_ui-0.1.0.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pane_ui-0.1.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file pane_ui-0.1.0.tar.gz.

File metadata

  • Download URL: pane_ui-0.1.0.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pane_ui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d788d913bb12e00f6a150f877e1e9beeb79f1b1affe872746e30484b7367ee18
MD5 c30f51904a115c95f0d59cd4cce383ee
BLAKE2b-256 a9033b766003d7dd9561163bc7cb3802c87fc9b2bcdd75d5af484c914c5c91ba

See more details on using hashes here.

File details

Details for the file pane_ui-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pane_ui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pane_ui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f4817bab98931ad06a0d1d904eef40dbfe1894a18d11025d8af80ea59f2b7a1
MD5 569d58ff360cbbbba821a06129802626
BLAKE2b-256 547c69e3fbd568ae3960767dc08a3074bcd743f7e356c23e6d553d24b79a566e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page