https://github.com/iliakarimi/textfx
textfx is a Python library for creating dynamic and visually engaging text effects and Loading Animation.
https://github.com/iliakarimi/textfx
cli color console console-effects open-source python python-library text text-animation text-color visualization
Last synced: 15 days ago
JSON representation
textfx is a Python library for creating dynamic and visually engaging text effects and Loading Animation.
- Host: GitHub
- URL: https://github.com/iliakarimi/textfx
- Owner: iliakarimi
- License: mit
- Created: 2025-01-13T10:09:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-25T16:21:02.000Z (4 months ago)
- Last Synced: 2025-11-28T21:54:33.934Z (4 months ago)
- Topics: cli, color, console, console-effects, open-source, python, python-library, text, text-animation, text-color, visualization
- Language: Python
- Homepage: https://pypi.org/project/textfx/
- Size: 1.16 MB
- Stars: 18
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Textfx
[](https://pepy.tech/projects/textfx)
[](https://pepy.tech/projects/textfx)

[](https://github.com/iliakarimi/textfx/blob/main/LICENSE)
[](https://github.com/iliakarimi/textfx)
Textfx is a lightweight Python library for creating dynamic, visually engaging console text effects and Loading Animation.
## π¦ Installation
```bash
pip install textfx
```
Or clone & install dependencies:
```bash
git clone https://github.com/iliakarimi/textfx.git
cd textfx
pip install -r requirements.txt
```
## π¨ Features
1. **Typing Effect**
2. **Scramble Effect**
3. **Wave Text**
4. **Untyping Effect**
5. **Unscramble Effect**
6. **Unwave Text**
7. **Loading Animations**
8. **Color Support** via `termcolor`
## π Usage
Import the desired effects and loaders:
```python
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:
```python
with SpinnerLoading(
message="Processing...",
animation="β β β Έβ ΄β ¦β ",
delay=0.1
):
do_work()
```
#### 2. ProgressBarLoading
Animated bar moving back and forth:
```python
with ProgressBarLoading(
barline='-', animation='β', length=30,
message="Loading", delay=0.05
):
do_work()
```
#### 3. GlitchLoading
Random-character glitch effect:
```python
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`](docs/examples.md).
## π¨ 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 `termcolor` outputs.*
## π Dependencies
* Python **3.9+**
* [`termcolor`](https://pypi.org/project/termcolor/)
Install dependencies:
```bash
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](LICENSE).
---
Enjoy using Textfx!