Skip to main content

Powerful and beautiful terminal output/input utilities for Python CLI tools.

Project description

🎨 termfx

Powerful and beautiful terminal output/input utilities for Python CLI tools.
Make your command-line tools look professional, readable and sexy 💅


🚀 Installation

You can install termfx via pip:

pip install termfx

Or clone manually and install from source:

git clone https://github.com/MyArchiveProjects/termfx
cd termfx
pip install .

💡 What is termfx?

termfx is a lightweight, modern, and flexible terminal UI helper —
ideal for hacking tools, CLI apps, devtools, fancy banners, dashboards and everything terminal-related.

  • ✅ Clean and colored terminal outputs
  • ✅ Centered input/output
  • ✅ Built-in prompts: [+], [!], [>], [-] style
  • ✅ Password/hidden input
  • ✅ Yes/No confirmation prompts
  • ✅ JSON pretty-printing
  • ✅ Tables, dividers and even progress bars
  • ✅ Works on Windows, Linux, MacOS

📦 Basic Usage

from termfx import *

printSuccess("Welcome to termfx!")
name = inputCentered("Enter your name:", mode="line")
printInfo(f"Hello, {name}!")

🧱 Functions Overview

✅ Print Functions

Function Description
printInfo(text) Light blue [>] prefix
printSuccess(text) Green [+] prefix
printError(text) Red [!] prefix
printWarning(text) Yellow [-] prefix
printBanner(text) Cyan banner text (no prefix)
printDivider(char="-", length=50) Horizontal line divider

🔤 Input Functions

Function Description
inputInfo(text) Input with [>] prompt
inputSuccess(text) Input with [+] prompt
inputError(text) Input with [!] prompt
inputWarning(text) Input with [-] prompt
inputCentered(text, mode="banner") Centered input
inputHidden(prompt) Hidden input (e.g. password)
askYesNo(question) Prompt for y/n confirmation

🧰 Utilities

JSON Pretty-Print

data = {"name": "Alice", "age": 30}
printJsonPretty(data)

Tables

printTable(
    headers=["User", "Score"],
    rows=[["Alice", 100], ["Bob", 85]]
)

Progress Bar

import time
total = 50
for i in range(total + 1):
    progressBar(i, total, prefix='Progress', suffix='Complete', length=40)
    time.sleep(0.05)

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

termfx-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

termfx-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file termfx-1.0.0.tar.gz.

File metadata

  • Download URL: termfx-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for termfx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fccb2e7046259584c0c749acb075104dec4867138b5b0e28ad3fec12db9e8bf3
MD5 32106dbc1bfc06834fe055222beeca3a
BLAKE2b-256 6dd40730859ff0344897593eeb101e8944f400b90a8170dd1ba523ab10e879ab

See more details on using hashes here.

File details

Details for the file termfx-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: termfx-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for termfx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 896c2cf22f289b44c9f15eff5cb91ae78e0b98410f005023713352b56f5f533c
MD5 fe13638b296ec99a6733b336cbd4a6ef
BLAKE2b-256 3f70895ca9a112499316fe5805be04b08596f2ae4ea89b4494e96f5156a2bb21

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