Skip to main content

An experimental TUI framework for Python, inspired by React and Tailwind

Project description

PyPI PyPI - License Docs

pre-commit.ci status codecov

GitHub issues GitHub pull requests

Counterweight

Counterweight is an experimental text user interface (TUI) framework for Python, inspired by React and Tailwind CSS.

A TUI application built with Counterweight is a tree of declarative components, each of which represents some piece of the UI by bundling together a visual element along with its state and how that state should change due to events like user input.

As an application author, you define the components and their relationships as a tree of Python functions. You use hooks to manage state and side effects, and styles to change how the elements look.

Counterweight takes this declarative representation of the UI and renders it to the terminal, updating the UI when state changes in response to user input or side effects (by calling your function tree).

Installation

Counterweight is available on PyPI:

pip install counterweight

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

counterweight-0.0.9.tar.gz (46.5 kB view hashes)

Uploaded Source

Built Distribution

counterweight-0.0.9-py3-none-any.whl (54.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page