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.9.tar.gz (41.6 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.9-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: consolem-0.1.9.tar.gz
  • Upload date:
  • Size: 41.6 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.9.tar.gz
Algorithm Hash digest
SHA256 557d4b414f89ca7bddc3010925f7765070ff5fe005991aaeeb7a9eb8d015e332
MD5 f0ff6852a9ec82498cdf848d6fb34762
BLAKE2b-256 99db9ba115dfdfa42a44bb070b5e29cf72c24e1af1a83db888d0d8f148e3b774

See more details on using hashes here.

File details

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

File metadata

  • Download URL: consolem-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 43.8 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d0ff0cd6c575542208dc042f118a69058d5dcb50de9f41b288582f0e329b71d1
MD5 363a3fbc4a1d12612ca20b16d61bbb20
BLAKE2b-256 3f2f8467af533d014006be11381129d12044cf8bd1683fa30130368ffab3ff79

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