A modern Python terminal utility library with text effects, loading animations, spinners, progress bars, and interactive input.
Project description
✨ Ter-FX
Build beautiful terminal applications with ease.
Ter-FX is a lightweight, beginner-friendly Python package that helps you create modern terminal applications. Whether you're making command-line tools, shell emulators, installers, games, or automation scripts, Ter-FX provides colorful output, interactive input, loading effects, logging utilities, and a built-in command-line interface.
Features
- 🎨 ANSI color support
- 🖨️ Simple colored printing
- ⌨️ Interactive user input
- 🔢 Number input validation
- 🔒 Hidden password input
- 📍 Centered text
- ⌛ Typewriter text effect
- 🌀 Animated spinners
- 📊 Progress bars
- ⏳ Loading animations
- 📝 Logging system
- 🖥️ Built-in CLI
- ⚡ Lightweight
- 🐍 Pure Python
Installation
Install from PyPI
pip install terfx
Install from source
git clone https://github.com/YOUR_USERNAME/terfx.git
cd terfx
pip install -e .
Quick Start
from terfx import Console
Console.printin("Hello, World!", "green")
Output
Hello, World!
Console
Printing Text
Console.printin("Hello!", "green")
Typewriter Effect
Console.printout(
"Welcome to Ter-FX!",
"cyan",
speed=0.03
)
User Input
name = Console.input(
"Enter your name: ",
"yellow"
)
Number Input
age = Console.numinput(
"Enter your age: "
)
Supports both integers and decimal numbers.
Password Input
password = Console.passinput(
"Password: "
)
Input remains hidden while typing.
Center Text
Console.printcenter(
"Welcome!",
"magenta"
)
Effects
Spinner
Console.spinner(
"Loading",
3,
"cyan"
)
Loading Screen
Console.loadscr(
"Installing",
5,
"green"
)
Progress Bar
for i in range(101):
Console.progress(i, 100)
Log
from terfx import Log
Info
Log.info("Connecting...")
Success
Log.success("Connected!")
Warning
Log.warning("Low memory!")
Error
Log.error("Connection failed!")
Debug
Log.debug("Variable x = 42")
Available Colors
black
red
green
yellow
blue
magenta
cyan
white
Example
Console.printin(
"Blue Text",
"blue"
)
Command Line Interface
Ter-FX installs a command-line utility.
Show package information
terfx
Show help
terfx --help
Show version
terfx --version
Run demo
terfx demo
Show supported colors
terfx colors
Package information
terfx info
Examples
terfx examples
Run tests
terfx test
Credits
terfx credits
License
terfx license
Complete Example
from terfx import Console
Console.printcenter("Ter-FX Demo", "cyan")
name = Console.input(
"Enter your name: ",
"green"
)
Console.printout(
f"Welcome {name}!",
"yellow"
)
Console.spinner(
"Loading",
2
)
for i in range(101):
Console.progress(i, 100)
Console.printin(
"Finished!",
"green"
)
Project Structure
terfx/
│
├── __init__.py
├── cli.py
├── colors.py
├── console.py
├── decorators.py
├── log.py
Requirements
- Python 3.9+
- Windows
- Linux
- macOS
Roadmap
Planned features:
- More terminal effects
- Tables
- Boxes
- Menus
- Better CLI framework
- Themes
- RGB colors
- Cursor control
- Text styling
- Terminal widgets
- More decorators
Contributing
Contributions are welcome.
You can help by:
- Reporting bugs
- Suggesting features
- Improving documentation
- Optimizing code
- Creating examples
License
This project is licensed under the MIT License.
Author
Faizan-ur-Rahim
Created with ❤️ using Python.
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 ter_fx-1.0.1.tar.gz.
File metadata
- Download URL: ter_fx-1.0.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe16d9a372dbb5d2bf4a8a256a83423c21bdf8aed8285df7a2956042289edac6
|
|
| MD5 |
cdf7e4e81cdbfebef48f2c9f3d1d41d9
|
|
| BLAKE2b-256 |
378413276707c09e02ad247477166b70b8ed293e7952930f6b856bf1a74579aa
|
File details
Details for the file ter_fx-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ter_fx-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f16c0872210e0adb7d22b969b7ae47b393cfb28535b6c2935cf6305e523aaecb
|
|
| MD5 |
ca4ce3d95d9df72b063fba93f3310e40
|
|
| BLAKE2b-256 |
130bbd33e84109644ed132b1dde904d1d53fbd5a6acdff69a5b25370a6777f63
|