Skip to main content

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.

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

Collecting dependencies...

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

Collecting dependencies - done

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

% 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

Metadata

Release files for cozyconsole 0.4.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 cozyconsole 0.4.1
File Size Uploaded
cozyconsole-0.4.1.tar.gz 13.7 kB Details

Built distribution (wheel)

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

Total release size: 23.9 kB

Release files / cozyconsole-0.4.1.tar.gz

Download URL cozyconsole-0.4.1.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7db854256188cd3de1d9b678447f24a9efb3edef6eba3d08613f534367270a77
BLAKE2b-256 checksum
How to use checksums
2f3196d6ea912fdb5ec2cfb11c08514ed45466fcfb3d907f1e8da2ffd37886d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / cozyconsole-0.4.1-py3-none-any.whl

Download URL cozyconsole-0.4.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73bf8d575df651062a8b407c3e0b28f91b350932a0f00f3292541825582d38e4
BLAKE2b-256 checksum
How to use checksums
2bea604695720ef3da6622afec4897664b876a47fdfb100f4c2301719782ffdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

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