Skip to main content

Tesserae

Write desktop apps in Python and YAML. A Tesserae app is YAML views (what the screen looks like), each paired with a Python ViewModel (what it does), drawn by the Tesserae Render Engine (tre): a Rust/Python hybrid for rendering, layout, animation and accessibility.

Tesserae's own shape follows pyCopper (an earlier, standalone framework by the same author): app authors write views, not Python widget-class trees, and a plain Signal-driven MVVM layer keeps them in step.

Status: pre-alpha. The documentation is the reference, and the changelog says what each release changed.

tesserae: 0.5
# Counter_View.yaml
name: Counter
widget: Container
style: {flex_direction: vertical, gap: 12, padding: 24, background: surface}
children:
  - widget: Text
    name: label
    text: "Count: {{ count }}"
    typography_role: headline_medium
    style: {foreground: on_surface}
  - {widget: Button, name: button, label: Count, style: {width: 120}, handlers: {on_click: increment}}
# Counter_ViewModel.py
from tesserae import Signal, ViewModel

class CounterViewModel(ViewModel):
    views = "Counter"             # the view it serves

    def __init__(self):
        super().__init__()
        self.count = Signal(0)

    def increment(self):
        self.count.update(lambda n: n + 1)
# app.py
from tesserae import App
from Counter_ViewModel import CounterViewModel

app = App(width=240, height=160, title="Counter", search=["."])
app.bind(CounterViewModel)
app.open_view("Counter")      # Counter_View.yaml
app.show("Counter")
app.run()
python app.py

A view is a tree of widget: nodes. A view with params: is a component, called by its name; for: and if: build lists and choices from data; every Material Design 3 component ships as such a view. See the view language, the component pages and the Getting Started walk-through, then the Tasks tutorial.

Files: Tesserae reads them, tre gets data

You give Tesserae file paths or names: views, images, themes, stylesheets and fonts. Tesserae reads, parses, decodes and checks them itself and hands tre only data (a finished view on tre's building blocks, RGBA pixels and font bytes). Every error names the file, line and column you wrote, and the nearest name when you misspelt one.

Tesserae logs through loguru: hot reloads, failed reloads naming the file, and warnings. Call tesserae.configure_logging() in app.py for its console format, or logger.disable("tesserae") to silence it.

Install

pip install tesserae-ui

That's all: it installs Tesserae and everything it needs, tre's engine included, as prebuilt wheels. It needs Python 3.12 or newer, on Linux x86-64, macOS on Apple silicon or Windows x64 (elsewhere, pip builds tre from source, which needs Rust). The PyPI name is tesserae-ui (tesserae on PyPI is an unrelated project); the import name is tesserae. If you installed tess-ui, a name it was briefly published under, run pip uninstall tess-ui, then pip install tesserae-ui. Start an app with tesserae new myapp. What's new: the changelog.

Release an app

pip install "tesserae-ui[build]"
tesserae build --check

makes the app one executable, dist/myapp (.exe on Windows), which its users run with nothing else installed. tesserae build --installer makes each platform's installer instead: a .dmg on macOS, a setup .exe on Windows, and an AppImage, .deb, pacman package, .rpm and Flatpak on Linux. Build on each platform you release for; signing with your own certificates, and the rest, is in Releasing Your App.

Install (development)

Tesserae needs tre 0.5.7 or newer, below 0.6, which is on PyPI as tesserae-engine (still import tre). Installing Tesserae installs it:

pip install -e ".[dev]"

Coming from a GitHub tre-... wheel, run pip uninstall tre first: pip treats tesserae-engine as a different project, and both would own the tre package. See the installation guide for testing against an unreleased tre checkout.

Examples

python examples/getting_started/declarative/step4/app.py   # the counter above
python examples/tutorial/step5/app.py                      # the Tasks tutorial
python examples/counter/app.py                             # one view and the ViewModel that serves it
python examples/multi_screen/app.py [settings]             # two screens, shared state, routes and a deep link
python examples/todo_list/app.py                           # a list kept by `for:` and `key:` from one Signal
python examples/custom_title_bar/app.py                    # a window whose title bar the app draws
python examples/window_dock/app.py                         # a window with a title bar, a rail, docked panels and routed screens
python examples/typing_effects/app.py --interactive        # flash, fade-in and a gliding caret on a text field

Each checks itself with real dispatched clicks and renders a few frames headless (--interactive, where there is one, keeps the window open).

Reactivity

Signal, Computed, Effect, batch and ViewModel are Tesserae's own (tesserae.reactive):

from tesserae import Computed, Effect, batch

total = Computed(lambda: price.get() * quantity.get())  # derived, cached
Effect(lambda: print(f"total is now {total.get()}"))     # side effect only

def apply_discount():
    price.update(lambda p: p * 0.9)
    quantity.set(quantity.get() + 1)

batch(apply_discount)  # total recomputes once, not twice

A {{ }} binding in a view can read a Signal or a Computed directly. See Reactivity.

Starting an app

tesserae new notes makes a runnable app; --window makes the app one window view with a rail and two routed screens. tesserae add screen Settings adds a screen. See Getting Started and the CLI.

Architecture

See the architecture page. To work on Tesserae itself, DEVELOPING.md.

Releasing: publishing a GitHub Release runs .github/workflows/release.yml. It checks that the tag matches the version and that no dependency is PyPI's unrelated tre, tests the built wheel, and uploads it with trusted publishing once the pypi environment's reviewer approves (0.1.0, 2026-09-28).

Every known gap has a scoped issue: Tesserae's issues.

Metadata

Release files for tesserae-ui 0.5.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tesserae-ui 0.5.1.9
File Size Uploaded Provenance Actions
tesserae_ui-0.5.1.9.tar.gz 2.5 MB With provenance Details for tesserae_ui-0.5.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tesserae-ui 0.5.1.9
File Interpreter ABI Platform Actions
tesserae_ui-0.5.1.9-py3-none-any.whl Python 3 none any Details for tesserae_ui-0.5.1.9-py3-none-any.whl

Total release size: 3.2 MB

Release files / tesserae_ui-0.5.1.9.tar.gz

Download URL tesserae_ui-0.5.1.9.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3e91c7f81961e1c70e94ca7ccc1e6c96686c9ac8e1f3cbc3ef613f560125860e
BLAKE2b-256 checksum
How to use checksums
3aff7db314bceeada6f4e8fcc49687d26eac800ec5bc20d3848a579db7911221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / tesserae_ui-0.5.1.9-py3-none-any.whl

Download URL tesserae_ui-0.5.1.9-py3-none-any.whl
Size 683.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec287a59cf6289650503439699cd9522b89176aad4c4f1082a23added63b862c
BLAKE2b-256 checksum
How to use checksums
6d1e21fb8ee069581bd0e63c7495ce540d322054439d47e46f40f7df0e9c2ff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for tesserae-ui 0.5.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tesserae_ui-0.5.1.9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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