Skip to main content

A powerful Python library for terminal manipulation and text styling

Project description

ConsoleM

A powerful Python library for terminal manipulation and text styling. ConsoleM provides a simple and intuitive API for creating beautiful terminal applications with advanced features like cursor control, text styling, and keyboard input handling.

Features

  • Terminal Manipulation

    • Precise cursor movement (absolute and relative positioning)
    • Screen clearing and line management
    • Alternate screen support for full-screen applications
    • Terminal size detection and cursor position tracking
    • Cursor visibility control
    • Non-blocking keyboard input handling
  • Text Styling

    • Rich text formatting with intuitive markup syntax
    • 256-color support (foreground and background)
    • Text styles (bold, underline, italic, etc.)
    • Emoji support with automatic conversion
    • Easy-to-use BBCode-like markup syntax
    • Automatic style reset and cleanup
  • Input Handling

    • Non-blocking keyboard input capture
    • Key event queue management
    • Special key detection (arrows, function keys, etc.)
    • Thread-safe input processing
    • Clean shutdown handling

Installation

pip install ConsoleM

Quick Start

from ConsoleM import Terminal
from ConsoleM.Style.text import Text

# Create a terminal instance
term = Terminal()

# Print styled text
Text("[blue bold]Welcome to ConsoleM![/]").print()

# Get terminal size
width, height = term.get_terminal_size()
Text(f"[green]Terminal size: {width}x{height}[/]").print()

Documentation

For detailed documentation, visit: https://consolem.readthedocs.io/en/latest/index.html

License

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

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

consolem-0.1.11.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

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

consolem-0.1.11-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file consolem-0.1.11.tar.gz.

File metadata

  • Download URL: consolem-0.1.11.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for consolem-0.1.11.tar.gz
Algorithm Hash digest
SHA256 bf34d189513653d395ff1d9e40f6f9bf1e2f852e69c04d7a842939490632f4ab
MD5 408eeb9a2bd30c402314768fca5ccae7
BLAKE2b-256 d4c262a2fb7216f1027e416c91555c8a17674a0e56854f3c552d5c88b9696f1f

See more details on using hashes here.

File details

Details for the file consolem-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: consolem-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for consolem-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 a198df37bb4c5027c2157c17972eaf63dd45cce343a01ed97af4d8e931cdfdbe
MD5 70e75ed75c409b78fbf963794046e3cb
BLAKE2b-256 f036accc03f187d77cb4918660b96b078b9144e5e7ed551c7c8495b8e63bdc57

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