Skip to main content

ren-ui-python

Write native RenkuOS/HaikuOS desktop apps in plain Python and package them as .hpkg.

The windows, buttons and dialogs are the system's own controls, driven through a small C++ bridge to libbe. There is no web view and no extra syntax to learn beyond Python.

from ren_ui import Application, Event, Window, Column, Row, Label, TextInput, Button

with Application("application/x-vnd.example-hello") as app:
    message = Label("Welcome!")
    name = TextInput(label="Name:")
    greet_button = Button("Say hello")

    @greet_button.onclick
    def greet(event: Event):
        message.text = f"Hello, {name.text or 'Haiku'}!"

    Window(app, "Hello", Column(message, name, Row(greet_button, padding=0))).show()
    app.run()

Documentation

https://ren-ui-python.rainygirl.com/ - reference and tutorials in English, 한국어, 日本語, Italiano and Français.

Requirements

  • Running apps and building packages: RenkuOS or Haiku (x86_64, 32-bit x86 hybrid, arm64), Python 3.11 or newer with a shared libpython, and a C++17 compiler (ren doctor checks the tools).
  • Other systems (macOS, Linux, Windows): the package installs and you can create, check and stage projects, but windows cannot be shown.

Install

pip install ren-ui-python

Command line

ren init my_app      # create a project
ren check my_app     # validate the manifest and sources (any OS)
ren doctor           # check the build tools
ren run my_app       # compile the bridge and run the app
ren build my_app     # produce an installable .hpkg

A built package depends on the system's Python library (for example lib:libpython3.12), so pkgman install pulls in Python automatically.

What is included

  • Widgets: Label, Button, TextInput, TextArea, CheckBox, Slider, Image, laid out with Column and Row
  • ren_ui.system: alerts and confirmations, native open/save file panels, clipboard, opening URLs, the settings directory
  • The ren tool: project scaffold, validation, HPKG packaging with app signature, icon and Deskbar entry

License

MIT

Metadata

Release files for ren-ui-python 0.2.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 ren-ui-python 0.2.0
File Size Uploaded
ren_ui_python-0.2.0.tar.gz 70.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ren-ui-python 0.2.0
File Interpreter ABI Platform
ren_ui_python-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 104.5 kB

Release files / ren_ui_python-0.2.0.tar.gz

Download URL ren_ui_python-0.2.0.tar.gz
Size 70.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4be871ea75043fa905d5832b2578f8864077754f0e5b41a445c205b82cd3cebe
BLAKE2b-256 checksum
How to use checksums
d8aeac800873adff179b54a695c0cd1fdfe4d784300fd279e95bfda481c5cbda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release files / ren_ui_python-0.2.0-py3-none-any.whl

Download URL ren_ui_python-0.2.0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c266656b640539d0cdca217379c99dcc0660ffd74130a9dd16b566f788a46f6
BLAKE2b-256 checksum
How to use checksums
557af2b859bd3878823744f2ea5950d0378d4ec0cb2c25531220e56254ce9a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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