Skip to main content

Experimental Python UI runtime with reactive components and live previews.

Project description

Otoe

Otoe is an experimental Python UI runtime for operational interfaces: write reactive components, preview them as HTML, test them headlessly, render deterministic native frames, and build offline bundles for constrained Linux targets.

The project is still pre-alpha. The core runtime, HTML preview path, headless native spike, and offline bundle pipeline are active technical-preview surfaces; Otoe is not yet a stable public framework or production desktop renderer. Readable native PNG text is available through the optional Pillow-backed renderer path; the default native renderer stays dependency-free and deterministic.

What Works Today

  • Python component functions with explicit widget props and event contracts.
  • signal, computed, effect, lifecycle cleanup, Show, and keyed For.
  • Static HTML rendering and live HTML preview support for live-preview apps.
  • A small portable style layer through css(...), StyleSheet, and utilities.
  • otoe.ui primitives for app frames, cards, badges, action buttons, tabs, tables, dialogs, toasts, command palettes, sidebars, menus, selects, lists, and metric surfaces.
  • Headless native layout, paint, PNG output, hit testing, click, focus, keyboard, input, and scroll dispatch through NativeSurface.
  • Offline planning, dependency audit, build, generated runner validation, and pack commands for the first hardware/cage profile.
  • Backend-candidate evidence tooling around RenderTree, styleOps, coverage declarations, and an experimental external Path0 JSON runner.

Not Ready Yet

  • Stable API guarantees.
  • Production native rendering, GPU rendering, real text shaping, or retained desktop windowing.
  • Platform accessibility tree output.
  • Full browser CSS compatibility.
  • A complete native-parity component library.

Quick Start

Use Python 3.11 or newer.

python -m pip install otoe
otoe new hello_otoe
cd hello_otoe
otoe dev app:app --css styles.css
otoe render app:app --out preview.html --css styles.css --pretty
otoe render app:app --out preview.png --native --css styles.css
otoe render app:app --out preview@2x.png --native --native-scale 2 --css styles.css
otoe build app:app --out dist/cage --css styles.css --validate

otoe new writes a small renderable app plus styles.css. otoe dev serves the scaffold as a local live HTML preview; the HTML render is the fastest static visual check; the native PNG render exercises the current headless native spike; --native-scale writes higher-density deterministic PNGs without changing layout units; the build command writes and validates a minimal offline bundle. For readable native PNG text during local previews, install otoe[native-text] and render with --native-text pillow; deterministic offline bundles declare their font through [native.text] in otoe.profile.toml.

For local development from a checkout:

python -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
pytest -q

Repository examples such as examples.quickstart:app are available from a source checkout, not from the installed wheel:

PYTHONPATH=src:. python -m otoe render examples.quickstart:app --out preview.html --pretty
PYTHONPATH=src:. python -m otoe render examples.quickstart:app --out preview.png --native
PYTHONPATH=src:. python -m otoe dev examples.live_counter:app --port 8767

Tiny Example

from otoe import Button, Text, VStack, component, computed, mount, signal


@component
def Counter():
    count = signal(0)
    label = computed(lambda: f"Clicked {count.value} times")

    return VStack(
        Text(label),
        Button("Increment", onClick=lambda: count.set(count.value + 1)),
        gap=8,
    )


tree = mount(Counter())

Product Shape

Otoe should not be read as a generic replacement for Qt, Flutter, or browser apps. The strongest current niche is Python-first operational software:

  • hardware control panels
  • kiosks and appliance UIs
  • internal dashboards
  • offline-testable local tools
  • renderer/backend experiments that need deterministic evidence

The backend and evidence tooling is intentionally advanced and experimental. New app authors should start with otoe new, HTML/native render, and the portable UI subset before reaching for backend-candidate commands. Use otoe portable-core to inspect the current Portable Core UI v0 support matrix from the installed package. The Phase 5 professional reference apps are documented in REFERENCE_APP_PATTERNS.md and validated through the hardware, admin, data workflow, utility, SaaS, and UI examples.

Documentation

Repository Map

  • src/otoe/ - runtime package.
  • tests/ - runtime, renderer, build, and example regression tests.
  • examples/ - source-checkout validation surfaces and case studies.
  • preview/ - generated preview artifacts.
  • docs/ - product-facing guides and support matrices.
  • ADR-*.md - design decisions. ADR-019-native-pillow-text-backend.md records the first real native text backend choice, and ADR-020-native-layout-v0-v1-decision.md records the stack-first native layout v0/v1 boundary.

Status

Current status: post-v0.1.8 workshop hardening. The test baseline is 758 passing tests with optional typing/Pillow tests skipped when those dependencies are unavailable. See ROADMAP.md for the active phase plan.

License

MIT License. Copyright (c) 2026 Forvara.

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

otoe-0.1.8.tar.gz (525.6 kB view details)

Uploaded Source

Built Distribution

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

otoe-0.1.8-py3-none-any.whl (184.2 kB view details)

Uploaded Python 3

File details

Details for the file otoe-0.1.8.tar.gz.

File metadata

  • Download URL: otoe-0.1.8.tar.gz
  • Upload date:
  • Size: 525.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for otoe-0.1.8.tar.gz
Algorithm Hash digest
SHA256 18693097546eb716be83a2d9b1d4f0acf09003eb3d460954252c824c65c62e98
MD5 cf122a502a4fc56fcb3770608dedef42
BLAKE2b-256 cad8ba268a1b4d1e3d525992e5ce5184b0d86816c2b67971cd4ffb231c0f57c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for otoe-0.1.8.tar.gz:

Publisher: publish.yml on NeonShapeshifter/Otoe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file otoe-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: otoe-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 184.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for otoe-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2d4c53cf184e1811d55af7b0d3f3c5a74ff424459d3972824bb0fcfd0fa0c24b
MD5 1cb621ac4d9ec82002ce80228c985b5a
BLAKE2b-256 c1ee4f129ad510b20fea259adf6716cde48e882953187604778253d70da746d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for otoe-0.1.8-py3-none-any.whl:

Publisher: publish.yml on NeonShapeshifter/Otoe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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