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.10.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.10-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: consolem-0.1.10.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.10.tar.gz
Algorithm Hash digest
SHA256 8197971a48ec8f4d071eef842eac0ddf83dd0b5c6593d139fd13911413040a68
MD5 75705c0e22b5dc6410fc680d289b21b5
BLAKE2b-256 fc6c760259d3f7682fa3546ee02d0325edfb01e5b86e54ff7e2347b763b7ad06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: consolem-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 44.3 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6ac5737e43c6b0b3cf56d4042e7e7de390dc4cdf53b173d76b67963cfccaccf6
MD5 346c8bd227b8c6464a7dccd6cc46225f
BLAKE2b-256 670101af91f5125a7ea58f1a58a8a684967ced8406c81e9b1a1ee245d1bd06b5

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