textfx is a Python library for creating dynamic and visually engaging text effects and Loading Animation.
Project description
Textfx
Textfx is a lightweight Python library for creating dynamic, visually engaging console text effects and Loading Animation.
Installation
pip install textfx
Or clone & install dependencies:
git clone https://github.com/iliakarimi/textfx.git
cd textfx
pip install -r requirements.txt
Features
- Typing Effect
- Scramble Effect
- Wave Text
- Untyping Effect
- Unscramble Effect
- Unwave Text
- Loading Animations
- Color Support via
termcolor
Usage
Import the desired effects and loaders:
from textfx import (
typeeffect, scrameffect, wavetext,
untypeeffect, unscrameffect, unwavetext,
SpinnerLoading, ProgressBarLoading, GlitchLoading
)
Loading Animations
All loader classes share these parameters:
message(str): Prefix text displayed before the animation.end_message(str): Text displayed after the loader stops.delay(float): Seconds between animation frames.
1. SpinnerLoading
Classic spinner cursor:
with SpinnerLoading(
message="Processing...",
animation="⠋⠙⠸⠴⠦⠇",
delay=0.1
):
do_work()
2. ProgressBarLoading
Animated bar moving back and forth:
with ProgressBarLoading(
barline='-', animation='â–ˆ', length=30,
message="Loading", delay=0.05
):
do_work()
3. GlitchLoading
Random-character glitch effect:
with ProgressBarLoading(message="Compiling Code", barline=".", animation="âš™", length=40, message_color="cyan", animation_color="yellow", barline_color="white", delay=0.07):
time.sleep(5)
For detailed examples, see Documention.
Color Options
All effects support an optional color parameter (via termcolor):
black
red
green
yellow
blue
magenta
cyan
white
light_grey
dark_grey
light_red
light_green
light_yellow
light_blue
light_magenta
light_cyan
Ensure your terminal supports ANSI colors for
termcoloroutputs.
Dependencies
- Python 3.9+
termcolor
Install dependencies:
pip install -r requirements.txt
Contributing
Pull requests are welcome! For more examples and details, refer to docs/examples.md.
License
MIT License ... see LICENSE.
Enjoy using Textfx!
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 textfx-2.4.1.tar.gz.
File metadata
- Download URL: textfx-2.4.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96e2a814451bf8fc084fb72455a9187a9e2e29a3fe661baf281c955428cc8ff8
|
|
| MD5 |
586e60b6b5717be6690ce8b298d407aa
|
|
| BLAKE2b-256 |
bd9c784cb61f26d06e49303adde108402e8c8d2bd9cc55541234ce1430c1a885
|
File details
Details for the file textfx-2.4.1-py3-none-any.whl.
File metadata
- Download URL: textfx-2.4.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0d70bd1fb7e7681ce5fcff56a0d583d7cc8cda539c1ae537581999245451c1e
|
|
| MD5 |
47094414eda8a00f4c389e62db7ed8b8
|
|
| BLAKE2b-256 |
65bbba552b65a2a1ae0a44f3f87440e474a2dd3f9e7d0fb3bf147547f4328f4d
|