Skip to main content

Counterweight

PyPI PyPI - License Docs

quality-check

GitHub issues GitHub pull requests

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

Metadata

Release files for counterweight 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for counterweight 0.1.1
File Size Uploaded Provenance Actions
counterweight-0.1.1.tar.gz 346.5 kB With provenance Details for counterweight-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for counterweight 0.1.1
File Interpreter ABI Platform Actions
counterweight-0.1.1-py3-none-any.whl Python 3 none any Details for counterweight-0.1.1-py3-none-any.whl

Total release size: 770.0 kB

Release files / counterweight-0.1.1.tar.gz

Download URL counterweight-0.1.1.tar.gz
Size 346.5 kB
Tags Source
SHA-256 checksum
How to use checksums
97522df99dedfe4682498f1261ad7c8510b359b445ed4a861172bbc43ad0a566
BLAKE2b-256 checksum
How to use checksums
e32f7ef133d449245660913d5d1047606d59b02ecf4ea654d66ed99655bcca2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / counterweight-0.1.1-py3-none-any.whl

Download URL counterweight-0.1.1-py3-none-any.whl
Size 423.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a785a3882342008293b0cb644f877fdcb0d98c6108474729d8a98cba401c5ac
BLAKE2b-256 checksum
How to use checksums
b16b1c9d60be9211188638fd9f3791f7d465aaa029ecb9f0d20a4b59f0588e3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for counterweight 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for counterweight-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page