counterweight


Namecounterweight JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/JoshKarpel/counterweight
SummaryAn experimental TUI framework for Python, inspired by React and Tailwind
upload_time2024-02-28 03:57:20
maintainer
docs_urlNone
authorJoshKarpel
requires_python>=3.11.2,<4
licenseMIT
keywords tui terminal
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![PyPI](https://img.shields.io/pypi/v/counterweight)](https://pypi.org/project/counterweight)
[![PyPI - License](https://img.shields.io/pypi/l/counterweight)](https://pypi.org/project/counterweight)
[![Docs](https://img.shields.io/badge/docs-exist-brightgreen)](https://www.counterweight.dev)

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/JoshKarpel/counterweight/main.svg)](https://results.pre-commit.ci/latest/github/JoshKarpel/counterweight/main)
[![codecov](https://codecov.io/gh/JoshKarpel/counterweight/branch/main/graph/badge.svg?token=2sjP4V0AfY)](https://codecov.io/gh/JoshKarpel/counterweight)

[![GitHub issues](https://img.shields.io/github/issues/JoshKarpel/counterweight)](https://github.com/JoshKarpel/counterweight/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/JoshKarpel/counterweight)](https://github.com/JoshKarpel/counterweight/pulls)

# Counterweight

Counterweight is an experimental text user interface (TUI) framework for Python,
inspired by [React](https://react.dev/) and [Tailwind CSS](https://tailwindcss.com/).

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](https://pypi.org/project/counterweight/):

```bash
pip install counterweight
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JoshKarpel/counterweight",
    "name": "counterweight",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11.2,<4",
    "maintainer_email": "",
    "keywords": "tui,terminal",
    "author": "JoshKarpel",
    "author_email": "josh.karpel@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2b/e1/a311f5f32c8e4834a7ea4c6561eca3001e11162054b41c4486dac79d5acf/counterweight-0.0.9.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/pypi/v/counterweight)](https://pypi.org/project/counterweight)\n[![PyPI - License](https://img.shields.io/pypi/l/counterweight)](https://pypi.org/project/counterweight)\n[![Docs](https://img.shields.io/badge/docs-exist-brightgreen)](https://www.counterweight.dev)\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/JoshKarpel/counterweight/main.svg)](https://results.pre-commit.ci/latest/github/JoshKarpel/counterweight/main)\n[![codecov](https://codecov.io/gh/JoshKarpel/counterweight/branch/main/graph/badge.svg?token=2sjP4V0AfY)](https://codecov.io/gh/JoshKarpel/counterweight)\n\n[![GitHub issues](https://img.shields.io/github/issues/JoshKarpel/counterweight)](https://github.com/JoshKarpel/counterweight/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/JoshKarpel/counterweight)](https://github.com/JoshKarpel/counterweight/pulls)\n\n# Counterweight\n\nCounterweight is an experimental text user interface (TUI) framework for Python,\ninspired by [React](https://react.dev/) and [Tailwind CSS](https://tailwindcss.com/).\n\nA TUI application built with Counterweight is a tree of declarative **components**,\neach of which represents some piece of the UI by bundling together\na visual **element** along with its **state** and how that state should change due to **events** like **user input**.\n\nAs an application author,\nyou define the components and their relationships as a tree of Python functions.\nYou use **hooks** to manage state and side effects,\nand **styles** to change how the elements look.\n\nCounterweight takes this declarative representation of the UI and **renders** it to the terminal,\nupdating the UI when state changes in response to user input or side effects\n(by calling your function tree).\n\n## Installation\n\nCounterweight is available [on PyPI](https://pypi.org/project/counterweight/):\n\n```bash\npip install counterweight\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An experimental TUI framework for Python, inspired by React and Tailwind",
    "version": "0.0.9",
    "project_urls": {
        "Bug Tracker": "https://github.com/JoshKarpel/counterweight/issues",
        "Documentation": "https://www.counterweight.dev",
        "Homepage": "https://github.com/JoshKarpel/counterweight",
        "Repository": "https://github.com/JoshKarpel/counterweight"
    },
    "split_keywords": [
        "tui",
        "terminal"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f5afa6cd36b180c63a3742b602acead2dcba58ad3ab38418be4b64deb85e526e",
                "md5": "eee68fca203bd0bdcd16ed1879b82b0f",
                "sha256": "44f242ec7e673cd007fbe5794957d8efc007e7df56e01cd1928d2d3fde38a47a"
            },
            "downloads": -1,
            "filename": "counterweight-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eee68fca203bd0bdcd16ed1879b82b0f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11.2,<4",
            "size": 53963,
            "upload_time": "2024-02-28T03:57:19",
            "upload_time_iso_8601": "2024-02-28T03:57:19.571968Z",
            "url": "https://files.pythonhosted.org/packages/f5/af/a6cd36b180c63a3742b602acead2dcba58ad3ab38418be4b64deb85e526e/counterweight-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2be1a311f5f32c8e4834a7ea4c6561eca3001e11162054b41c4486dac79d5acf",
                "md5": "69229d61e9a04845bcaf2b8b7d8f4296",
                "sha256": "569c6c846a91940e390401db17be8ff9ca882a6d772d88c8f9f552f6091cf133"
            },
            "downloads": -1,
            "filename": "counterweight-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "69229d61e9a04845bcaf2b8b7d8f4296",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11.2,<4",
            "size": 46509,
            "upload_time": "2024-02-28T03:57:20",
            "upload_time_iso_8601": "2024-02-28T03:57:20.709641Z",
            "url": "https://files.pythonhosted.org/packages/2b/e1/a311f5f32c8e4834a7ea4c6561eca3001e11162054b41c4486dac79d5acf/counterweight-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-28 03:57:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JoshKarpel",
    "github_project": "counterweight",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "counterweight"
}
        
Elapsed time: 0.20328s