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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| counterweight-0.1.0.tar.gz | 342.7 kB | With provenance | Details for counterweight-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| counterweight-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for counterweight-0.1.0-py3-none-any.whl |
Total release size: 761.5 kB
Release files / counterweight-0.1.0.tar.gz
| Download URL | counterweight-0.1.0.tar.gz |
|---|---|
| Size | 342.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c57b09327d7d6dd90c97075f5bea94f93c1668cf28c9f4c5c82713018efff7c
|
|
BLAKE2b-256 checksum How to use checksums |
f543b2f0474e13dcc3825c19a1175c9af1339795d7b084fb45d9ad7527fee2e9
|
| 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 21, 2026.
Transparency logRelease files / counterweight-0.1.0-py3-none-any.whl
| Download URL | counterweight-0.1.0-py3-none-any.whl |
|---|---|
| Size | 418.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a24c977b56d0a19b85586a7ec97805858a9b23d0bd1dec03a579e686b4f8b260
|
|
BLAKE2b-256 checksum How to use checksums |
d200437d1726b8bd9afdb4312384028f2da12a76c6968c14a345130fbb4d0a87
|
| 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 21, 2026.
Transparency logSecurity for counterweight 0.1.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.
Attestation for counterweight-0.1.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 Oct 21, 2026.
Transparency logA 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.