Skip to main content

Python SDK for the rstui graphical terminal runtime

Project description

rstui

Python child SDK for the rstui graphical terminal runtime.

python3 -m pip install rstui
cargo install rstui
from rstui import Frame, run

def on_event(event, context):
    return "render" if event["type"] == "start" else "continue"

def render(context):
    width = context["geometry"]["pixel_width"]
    height = context["geometry"]["pixel_height"]
    return Frame(width, height, bytes(width * height * 4))

run(on_event, render)

Run the application with:

rstui run -- python3 app.py

stdout is reserved for the framed protocol. Write diagnostics to stderr.

Project: https://github.com/maokangkun/Terminal/tree/main/rstui

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

rstui-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

rstui-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rstui-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rstui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6537a144751986096212674e53018f6312215be59d58ebf70075aa0df86bd258
MD5 2ec326761134ec721df5af39555dc904
BLAKE2b-256 958df5f4e83c9a8a9ff66d217a032e8b7d82c491b54184fa7687b19dbc391025

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rstui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rstui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab70661cafb19b0a061280553669bc88af6ecad48189bb31d3a7803b1ebe90c4
MD5 229426b14502267da7fb2fc413465f11
BLAKE2b-256 debeb32f51b600caa6a50a9a622b676154de67397d28405d354934d1c73270bf

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