Skip to main content

Python fork and translation of Ink for building terminal UIs

Project description

pyinkcli


pyinkcli

A Python fork and translation project of Ink for building terminal UIs with a React-like component model.

pyinkcli is a Python implementation inspired by and translated from Ink. This repository is a fork, not the official Node.js package, and the API is adapted for Python where needed.

Ink demo

Install

pip install pyinkcli

Quick Start

from pyinkcli import Box, Text, render


def Counter():
    return Box(
        Text("Hello from pyinkcli", color="green", bold=True),
        flexDirection="column",
        alignItems="center",
    )


app = render(Counter)
app.wait_until_exit()

What This Repo Is

  • A Python fork of Ink focused on translating the terminal UI model into Python
  • A repo that keeps the upstream JS implementation nearby for parity work and audits
  • A place for Python-native examples and tests under examples/ and tests/

Examples

  • examples/alternate-screen/
  • examples/chat/
  • examples/counter/
  • examples/terminal-resize/
  • examples/use-focus/
  • examples/use-input/

License

MIT. The repository includes the upstream Ink license text in LICENSE.

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

pyinkcli-0.1.0.tar.gz (130.4 kB view details)

Uploaded Source

Built Distribution

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

pyinkcli-0.1.0-py3-none-any.whl (184.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyinkcli-0.1.0.tar.gz
  • Upload date:
  • Size: 130.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyinkcli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1219ffc7c23edeb5ed96190aa7ff583042602e5e3b93ae8d0d247df84c7c1375
MD5 f2032e5baf4cb019437bc61cb2efbf80
BLAKE2b-256 4178eaa0b75897992c664ad1d85217ff5bf3f191f68ac8b17585d59b631ea3db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyinkcli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 184.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyinkcli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21ea24011efb8c5b6ae24908e9424a440fdd1a2b9963c9ea9129a442569ca4b0
MD5 b0afc60dc2dfc617c2a86dc7ecb1ac93
BLAKE2b-256 ac139a947db2b21a6a8294fc5fa9bc1014040e51c04c6c24a31ec13b767d8fb7

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