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.4.tar.gz (124.6 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.4-py3-none-any.whl (169.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyinkcli-0.1.4.tar.gz
  • Upload date:
  • Size: 124.6 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.4.tar.gz
Algorithm Hash digest
SHA256 1def0c56a204fe58eba5016f2f54c30439a24bf602213bd1c89c29d867768c46
MD5 424fd2e9d04b7f0a0028a37143edfa3b
BLAKE2b-256 ee97542bb0b56fc6d2269f05501c474108a336ef3f7c40f7631c7de282a668c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyinkcli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 169.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3685966da8e947b86f43c78446bfe1379fc624adc9b51fb26201c34e761758b7
MD5 dc03aed58e22a809fb7d65babf0b2929
BLAKE2b-256 a8c36d60a19573b3d7b0281905dfb606fcae0f87b1c310b13fefa522a57f26a9

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