Metadata-Version: 2.4
Name: ren-ui-python
Version: 0.1.0
Summary: Native RenkuOS/HaikuOS desktop apps in Python, packaged as HPKG
Author-email: Lee JunHaeng aka rainygirl <rainygirl@gmail.com>
License-Expression: MIT
Project-URL: Documentation, https://ren-ui-python.rainygirl.com/
Keywords: haiku,renkuos,gui,native,hpkg
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Other OS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: C++
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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.

```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

```sh
pip install ren-ui-python
```

## Command line

```sh
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
