Skip to main content

Tiny stdlib-only TUI framework for Python — zero third-party dependencies

Project description

Tuiko

Status: work in progress — this project is NOT finished yet.

The API and behavior may change at any time without notice. Do not use it in production. Everything you see here is experimental.

Tuiko is a tiny TUI framework for Python — stdlib-only, zero third-party dependencies. It renders with ANSI escape codes and reads input via msvcrt (Windows) / termios (POSIX).

What works today

  • prompt — single-line text input
  • select — pick one item, with digit jump (0-9)
  • multiselect — pick many items at once (checkboxes)
  • Realtime search (search=True) — type to filter the list live with the matching text highlighted, Inquirer-style: just type and pick; fuzzy=True matches letters in sequence (e.g. sxk finds "Spy x Family")
  • progress — progress bar (percentage) + spinner
  • status — one-line notice
  • session — full-screen mode (alt screen + raw input)
  • Inquirer-style windowed scrolling; card width and items per window adapt to the terminal size automatically

What is missing

  • Full API documentation
  • Integration with other projects (e.g. Indonime)
  • Battle-tested stability — expect rough edges

Quick usage

from tuiko import prompt, select, session

with session():
    name = prompt("What's your name?", hint="[ESC] quit")
    choice = select("Pick:", ["One", "Two"], search=True, fuzzy=True)

Customization

All text, icons, and colors can be overridden via tuiko.ui and tuiko.theme:

import tuiko

tuiko.ui.cursor = "▌"              # input cursor
tuiko.ui.banner = "★ Tuiko"        # wordmark
tuiko.ui.hint_select = "[↑/↓] Move · [ENTER] Select · [ESC] Cancel"

Examples

  • example.py — full flow with custom text & colors
  • examples/custom_ui.py — override all text & icons
  • examples/anime_search.py — anime search demo in the style of Indonime (mock data)

Run the demo

python -m tuiko

Tests

python -m unittest discover -s tests -v

Philosophy

Instead of patching InquirerPy via monkeypatching, all widgets are fully under our control — more stable and easier to understand.

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

tuiko-0.1.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

tuiko-0.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tuiko-0.1.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for tuiko-0.1.0.tar.gz
Algorithm Hash digest
SHA256 57bfe0bdcd1f9fa1db9c6ca91b9fdc7b68de828b368050a46e6b6ffea0eeb0f3
MD5 e688a2f4e757284af1d478a9e2cb9ec7
BLAKE2b-256 03cdba8c46e74b1aeefae8d5ccf7bf618e2922351561d4595575b9966c28e1f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tuiko-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for tuiko-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcd3f9ecb70e0d8869c08725760cfa20b6d25452801a91e9519230f691ab9886
MD5 d9e3e7f781c83a31c89bbfe97f565934
BLAKE2b-256 c44d1faa6a0bd6b6780d9bf18e028a71b406f21a58d01045a6566c3e17d2b859

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