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.2.0

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.2.0
File Size Uploaded Provenance Actions
counterweight-0.2.0.tar.gz 374.1 kB With provenance Details for counterweight-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 829.9 kB

Release files / counterweight-0.2.0.tar.gz

Download URL counterweight-0.2.0.tar.gz
Size 374.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6aa7ec0d7846a5532cf47d7df3a4afa882fece1286a02580ca1f3f9a424340b7
BLAKE2b-256 checksum
How to use checksums
fa7dc09ba4f6097b67f72ead0f220d4bf88d15f7c7da7a95e39e4fb30fadeac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

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

Download URL counterweight-0.2.0-py3-none-any.whl
Size 455.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f799e37275368a9a5b71083bd9176b00a71a44315061d4fc0fa0d5ad52442d3d
BLAKE2b-256 checksum
How to use checksums
497a2a42fc511c5b7746f5fee37d003de69a7356de396b51ff65f4a8dd5d4da2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

Security for counterweight 0.2.0

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.2.0.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 Nov 1, 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