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 apps look professional, stylish, and human-friendly 💅
🚀 Installation
Install via pip:
pip install termfx
Or install from source:
git clone https://github.com/MyArchiveProjects/termfx
cd termfx
pip install .
💡 What is termfx?
termfx is a lightweight and flexible terminal UI helper —
perfect for hacking tools, CLI utilities, developer dashboards, and more.
Features:
- ✅ Beautiful colored output
- ✅ Centered input/output
- ✅ Prompt styles:
[+],[!],[>],[-] - ✅ Hidden input for passwords
- ✅ Yes/No confirmation
- ✅ JSON pretty-printing
- ✅ Table rendering
- ✅ Progress bars
- ✅ Works on Windows, Linux, and macOS
⚡ Quick Example
from termfx import *
printSuccess("Welcome to termfx!")
printCentered("Loading complete", mode="line")
name = inputCentered("Enter your name:", mode="line")
printInfo(f"Hello, {name}!")
📚 API Overview
📤 Output 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) |
printCentered(text, mode='banner') |
Centered output; mode='banner' or 'line' |
printDivider(char='-', length=50) |
Horizontal divider line |
🧾 Input Functions
| Function | Description |
|---|---|
inputInfo(text) |
Standard [>] input prompt |
inputSuccess(text) |
Green [+] input |
inputError(text) |
Red [!] input |
inputWarning(text) |
Yellow [-] input |
inputCentered(text, mode='banner') |
Centered input; mode='banner' or 'line' |
inputHidden(prompt) |
Hidden input (e.g. for passwords) |
askYesNo(question) |
Ask a yes/no question, returns True/False |
🔧 Utilities
Pretty JSON Output
data = {"name": "Alice", "score": 95}
printJsonPretty(data)
Table Rendering
printTable(
headers=["User", "Score"],
rows=[["Alice", 90], ["Bob", 85], ["Eve", 99]]
)
Progress Bar
import time
total = 100
for i in range(total + 1):
progressBar(i, total, prefix='Progress', suffix='Complete', length=40)
time.sleep(0.03)
🤝 Contributing
Want to add features or fix something? Pull requests are welcome.
You can also submit issues on the GitHub issues page.
📄 License
MIT License – do whatever you want, just give credit.
🔗 Links
Enjoy building your sexy terminals 🤘
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
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 termfx-1.0.1.tar.gz.
File metadata
- Download URL: termfx-1.0.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bd66ac95985d564ce58c67dfde9f14ecb1348286dd515c86c830a32b5789700
|
|
| MD5 |
f1e139ed9462c5d1f86822164cde7ee8
|
|
| BLAKE2b-256 |
125de639c0907686ab6adf8143a8e2e9239f5681148c9eccad0654fd013d3a31
|
File details
Details for the file termfx-1.0.1-py3-none-any.whl.
File metadata
- Download URL: termfx-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce1c2913af8f2d9f57e89c6f0ebde6499fc4cdeefee573f420a26c84c3d3b357
|
|
| MD5 |
aa2e71ce57b22887195e15cc9b888403
|
|
| BLAKE2b-256 |
7fb294a25518c11cec832ad99d51d7a26eefd462ce19dca7d1d68217d0c0c605
|