cozyconsole


Namecozyconsole JSON
Version 0.4.1 PyPI version JSON
download
home_pageNone
SummaryMaking development of console-based apps a little more convenient
upload_time2023-11-18 19:10:16
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8,<4
licenseNone
keywords cli console rich
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cozyconsole

## Caveat

This package exists to support my other projects. Those may require breaking changes in here. Consequently, cozyconsole may never become "stable", never reach v1.0.0. Considering how little is in here at the moment, it is probably not worth your time.

## If you are still reading

cozyconsole currently contains:

`cozyconsole.consolex.ConsoleX` is a trivial wrapper around  `rich.console.Console`. It exists to avoid code duplication anti-patterns in my other projects.

`cozyconsole.activity.Activity` is a context manager for operations that run for a few seconds each. It displays a message while a piece of code is executing. When the execution is complete, its status is shown.

```python
from time import sleep
from cozyconsole.activity import Activity
with Activity("Updating dependencies") as act:
   sleep(3)   # simulating the actual code
   act.success = True
```

This displays

```sh
Collecting dependencies...
```

until the code finishes (here: 3 seconds), then updates that to show

```sh
Collecting dependencies - done
```

Activity can handle warnings, errors, and expections in various ways. Run

```bash
% python3 -m cozyconsole.demo
```

to see more.

## Ideas for v0.5.0 and beyond

- Evaluate if Activity should use `rich.status`.
- Activity and ConsoleX error and warning colors should be configurable via a TOML config file.
- A Rich-based horizontal barchart "widget".

## Credits

[Rich](https://pypi.org/project/rich/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cozyconsole",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8,<4",
    "maintainer_email": null,
    "keywords": "cli,console,rich",
    "author": null,
    "author_email": "Ralf Luetkemeier <foss@rlue.de>",
    "download_url": "https://files.pythonhosted.org/packages/2f/31/96d6ea912fdb5ec2cfb11c08514ed45466fcfb3d907f1e8da2ffd37886d9/cozyconsole-0.4.1.tar.gz",
    "platform": null,
    "description": "# cozyconsole\n\n## Caveat\n\nThis package exists to support my other projects. Those may require breaking changes in here. Consequently, cozyconsole may never become \"stable\", never reach v1.0.0. Considering how little is in here at the moment, it is probably not worth your time.\n\n## If you are still reading\n\ncozyconsole currently contains:\n\n`cozyconsole.consolex.ConsoleX` is a trivial wrapper around  `rich.console.Console`. It exists to avoid code duplication anti-patterns in my other projects.\n\n`cozyconsole.activity.Activity` is a context manager for operations that run for a few seconds each. It displays a message while a piece of code is executing. When the execution is complete, its status is shown.\n\n```python\nfrom time import sleep\nfrom cozyconsole.activity import Activity\nwith Activity(\"Updating dependencies\") as act:\n   sleep(3)   # simulating the actual code\n   act.success = True\n```\n\nThis displays\n\n```sh\nCollecting dependencies...\n```\n\nuntil the code finishes (here: 3 seconds), then updates that to show\n\n```sh\nCollecting dependencies - done\n```\n\nActivity can handle warnings, errors, and expections in various ways. Run\n\n```bash\n% python3 -m cozyconsole.demo\n```\n\nto see more.\n\n## Ideas for v0.5.0 and beyond\n\n- Evaluate if Activity should use `rich.status`.\n- Activity and ConsoleX error and warning colors should be configurable via a TOML config file.\n- A Rich-based horizontal barchart \"widget\".\n\n## Credits\n\n[Rich](https://pypi.org/project/rich/)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Making development of console-based apps a little more convenient",
    "version": "0.4.1",
    "project_urls": null,
    "split_keywords": [
        "cli",
        "console",
        "rich"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2bea604695720ef3da6622afec4897664b876a47fdfb100f4c2301719782ffdd",
                "md5": "d1149f68bb37f851bf91624a5f252a09",
                "sha256": "73bf8d575df651062a8b407c3e0b28f91b350932a0f00f3292541825582d38e4"
            },
            "downloads": -1,
            "filename": "cozyconsole-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d1149f68bb37f851bf91624a5f252a09",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4",
            "size": 10287,
            "upload_time": "2023-11-18T19:10:14",
            "upload_time_iso_8601": "2023-11-18T19:10:14.903465Z",
            "url": "https://files.pythonhosted.org/packages/2b/ea/604695720ef3da6622afec4897664b876a47fdfb100f4c2301719782ffdd/cozyconsole-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2f3196d6ea912fdb5ec2cfb11c08514ed45466fcfb3d907f1e8da2ffd37886d9",
                "md5": "95e347dce368ff7bb5fdf808739838d5",
                "sha256": "7db854256188cd3de1d9b678447f24a9efb3edef6eba3d08613f534367270a77"
            },
            "downloads": -1,
            "filename": "cozyconsole-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "95e347dce368ff7bb5fdf808739838d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4",
            "size": 13655,
            "upload_time": "2023-11-18T19:10:16",
            "upload_time_iso_8601": "2023-11-18T19:10:16.867160Z",
            "url": "https://files.pythonhosted.org/packages/2f/31/96d6ea912fdb5ec2cfb11c08514ed45466fcfb3d907f1e8da2ffd37886d9/cozyconsole-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-18 19:10:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "cozyconsole"
}
        
Elapsed time: 0.14338s