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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8197971a48ec8f4d071eef842eac0ddf83dd0b5c6593d139fd13911413040a68
|
|
| MD5 |
75705c0e22b5dc6410fc680d289b21b5
|
|
| BLAKE2b-256 |
fc6c760259d3f7682fa3546ee02d0325edfb01e5b86e54ff7e2347b763b7ad06
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ac5737e43c6b0b3cf56d4042e7e7de390dc4cdf53b173d76b67963cfccaccf6
|
|
| MD5 |
346c8bd227b8c6464a7dccd6cc46225f
|
|
| BLAKE2b-256 |
670101af91f5125a7ea58f1a58a8a684967ced8406c81e9b1a1ee245d1bd06b5
|