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.1.tar.gz (131.0 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.1-py3-none-any.whl (185.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyinkcli-0.1.1.tar.gz
  • Upload date:
  • Size: 131.0 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.1.tar.gz
Algorithm Hash digest
SHA256 7e4feaf5a0c927c831e9365db6b69227998a0d57cfa68986cd7c55824b747abf
MD5 4ce7900883433b4aee9822994e73f15e
BLAKE2b-256 9c008edbde5d82e81f77e3cc4ec3fb1c09c3c274adb7d4f74016366d6b048abf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyinkcli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 185.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd6938cc7b7a91d1e4338fdd832b3bbf7e6c7a58637d9469743e47d54ccfeeec
MD5 445811ef8ab8c562a3ff36ed483176e8
BLAKE2b-256 f0332d21af3baae60a8257d794ad7a7268b23913f9415d0c31f0cb38c5269408

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