Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

puretui

A zero-dependency, pure-stdlib terminal UI toolkit for Python (POSIX).

A styled cell-grid canvas with clipped regions, truecolor ANSI with 256/16/mono fallback, flexbox-style layout, raw keyboard + mouse input (bracketed paste, focus events), a flicker-free diff renderer, procedural widgets, an app kit (views, keymaps, command palette), and snapshot testing — in about 3,000 lines you can read in an afternoon.

from puretui import Canvas, Fixed, Flex, Theme, run
from puretui import widgets

def render(cols, rows, frame):
    cv = Canvas(cols, rows, widgets.base_style())
    root = cv.region()
    head, body = root.split_v(Fixed(2), Flex(1))
    head.left("hello, puretui", r=0)
    head.rule(r=1)
    body.center("q to quit", r=body.h // 2)
    return cv.to_lines()

run(render, on_key=lambda k: k not in ("q", "Q"))
  • Zero dependencies. Python 3.8+ standard library only. POSIX (macOS/Linux).
  • Explicit. Procedural drawing, plain data, no reactivity, no magic.
  • Tested. 600+ unit tests, property tests, a fuzzed input decoder, and byte-exact golden snapshots.
  • Fast. ~2ms full frames at 120x40; steady-state frames ~0.015ms (python3 benchmarks/bench.py for numbers on your machine).

Install

pip install puretui

Examples

python3 examples/dashboard.py    # layout, tables, sparklines, mouse
python3 examples/logtail.py      # app kit: views, filter capture, palette

Status

Pre-1.0: the API is stabilizing (__all__ defines the public surface; see CHANGELOG.md). Built as the engine of a World Cup terminal dashboard — the flagship consumer that keeps every release honest with byte-identical rendering oracles.

License

MIT

Metadata

Release files for puretui 0.6.0b1

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

Source distribution (sdist)

Source distribution for puretui 0.6.0b1
File Size Uploaded
puretui-0.6.0b1.tar.gz 90.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for puretui 0.6.0b1
File Interpreter ABI Platform
puretui-0.6.0b1-py3-none-any.whl Python 3 none any Details

Total release size: 136.2 kB

Release files / puretui-0.6.0b1.tar.gz

Download URL puretui-0.6.0b1.tar.gz
Size 90.7 kB
Tags Source
SHA-256 checksum
How to use checksums
35084abb9fd2ad5fb21bb9ad75c69c5aaceb750fbcf00820833fd7abed4ccb29
BLAKE2b-256 checksum
How to use checksums
58bbfd22a2f4c02a03293115f3238e7433b7375f91dae6fa399f47a6a2af9dd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release files / puretui-0.6.0b1-py3-none-any.whl

Download URL puretui-0.6.0b1-py3-none-any.whl
Size 45.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
233c7c8ae1d6eff2d974016ac4026167968f7e485a1ca4e14871d06a93caa210
BLAKE2b-256 checksum
How to use checksums
5cbf0094ba37ead9b74ec430bdf785964075bb28ecba1526010c0243033e45fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0b1 This release

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