Skip to main content

cmd-gui-kit: A Python toolkit for enhanced CLI visualizations.

Project description

cmd-gui-kit

cmd-gui-kit is a Python toolkit for creating enhanced CLI visualizations, including progress bars, spinners, heatmaps, tables, and status indicators. It provides a flexible and modular interface for building visually appealing command-line applications.

Features

  • Progress Bars: Dynamic, colored progress bars with percentage and elapsed time.
  • Spinners: Animated spinners for task progress.
  • Heatmaps: Visualize character frequencies or numerical data with a heatmap.
  • ASCII Tables: Create styled tables with custom headers and cell colors.
  • Status Indicators: Show success, error, warning, and info statuses with icons.
  • Logging: Real-time logs with levels (INFO, WARN, ERROR) and timestamps.

Installation

You can install cmd-gui-kit via pip:

pip install cmd-gui-kit

Usage

Import the Package

from cmd_gui_kit import CmdGUI
gui = CmdGUI()

Progress Bar

import time
for i in range(101):
    gui.progress_bar(i, text="Processing...")
    time.sleep(0.05)

Spinner

gui.spinner(duration=3, message="Loading...")

Heatmap

gui.heatmap("hello world")

ASCII Table

data = [["Alice", 90], ["Bob", 85], ["Charlie", 95]]
headers = ["Name", "Score"]
gui.ascii_table(data, headers=headers)

Status Indicators

gui.status("Operation completed successfully.", status="success")
gui.status("An error occurred.", status="error")

Logging

gui.log("This is an informational message.", level="info")
gui.log("This is a warning message.", level="warn")
gui.log("This is an error message.", level="error")

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmd_gui_kit-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmd_gui_kit-1.0.0-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cmd_gui_kit-1.0.0.tar.gz.

File metadata

  • Download URL: cmd_gui_kit-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for cmd_gui_kit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ca16bde29c2cc2b6c84f1e7185da92c6a1015eb8cc732f16da94149d5d8e9b2d
MD5 1f027b2e491600cfd985f73b6a924a7b
BLAKE2b-256 8d443377a61a9b58a310e03215285dfffa74bc1316732300b394ac645e6b1041

See more details on using hashes here.

File details

Details for the file cmd_gui_kit-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: cmd_gui_kit-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for cmd_gui_kit-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cf222d8b7bf3f11fef0707e39f7ebebe36703cbd2f6e309492ddd1e86a76c4c6
MD5 401b5b6fa0e08eccd71e0787b7a0c5c2
BLAKE2b-256 c6543571ef9cf366dbd957bff24b6728bf23442dd510487ff90405914966bb50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page