Skip to main content

A Python library for rich text and beautiful formatting in the terminal.

Project description

Termella

Termella is a Python library designed to make terminal output rich, colorful, and beautifully formatted with minimal effort.

Version Licence

✨ New in v0.0.8

  • App Architecture: Build full-screen applications that restore terminal history on exit.
  • Event Loop: Efficient hybrid loop handling inputs and animations.
  • Input Handling: Non-blocking keyboard support (on_key).
  • Mouse Support: Click handling (on_click) for Unix/Windows.
  • Responsiveness: Automatic resize detection (on_resize).

🛠 Installation

pip install termella
git clone https://github.com/codewithzaqar/termella.git
cd termella
pip install .

Quick Start

Basic Color Printing

The cprint function is the quickest way to output stylvd text.

from termella import cprint

cprint("Operation Successful", color="green", styles="bold")
cprint("System Failure", color="white", bg="bg_red", styles=["blink", "bold"])

The Text Object

For more control, use the Text class. It allows for method chaining and string concatenation.

from termella import Text

# Create styled parts
prefix = Text("[INFO] ").style(color="blue", styles="bold")
message = Text("Server is running...").style(color="white")

# Combine and print
print(prefix + message)

UI Components

Create professional-looking output using widgets.

from termella import panel

content = "Termella v0.0.1\nStatus: Online\nPort: 8080"
panel(content, color="cyan", title="Server Status")

Documentation

For detailed usage, please see the docs/ folder:

  1. API Reference - Details on classes and functions.
  2. Colors & Styles - A cheat sheet of all available options.

License

This project is licensed under the MIT License.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

termella-0.0.9.dev4.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

termella-0.0.9.dev4-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file termella-0.0.9.dev4.tar.gz.

File metadata

  • Download URL: termella-0.0.9.dev4.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for termella-0.0.9.dev4.tar.gz
Algorithm Hash digest
SHA256 47851390b5100254ea459076cc4841f1e4f5b93e471fb6cf1704ad2841bc679d
MD5 440235a1733b8c2f4412fe554253cb93
BLAKE2b-256 93bb4db8b38fa09f990c76c31c40a135e5bb00d744cd018fb0b9af675dc0bddd

See more details on using hashes here.

File details

Details for the file termella-0.0.9.dev4-py3-none-any.whl.

File metadata

  • Download URL: termella-0.0.9.dev4-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for termella-0.0.9.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 e994767af0512ca8936e3bca933fc589f22d74fbebb5a504614a3bbffacebad0
MD5 949628a1cf25451277b400e921bd491b
BLAKE2b-256 5c5585977895422af9f6ac62af84077a2d9dfca92ebc4424e5e52ff7fb1311a0

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