Skip to main content

textfx is a Python library for creating dynamic and visually engaging text effects and Loading Animation.

Project description

Textfx

PyPI Downloads PyPI Downloads Python License Repo Size

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

  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:

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 termcolor outputs.

Dependencies

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textfx-2.4.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

textfx-2.4.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file textfx-2.4.3.tar.gz.

File metadata

  • Download URL: textfx-2.4.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for textfx-2.4.3.tar.gz
Algorithm Hash digest
SHA256 c7ac4e19de3445d5b28fc2ad1267da25d0480ca51e8859f1ff50d9972057c543
MD5 9659c3d901bb5b5c7cc47da95d9af9e3
BLAKE2b-256 3dd72a750467ca1a367afa3e7366a9047170505cadcca9819c95beb6b8bac103

See more details on using hashes here.

File details

Details for the file textfx-2.4.3-py3-none-any.whl.

File metadata

  • Download URL: textfx-2.4.3-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for textfx-2.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 31485ea93dca901e8837d7c82f9f9b59e0f265e7caf5dc718269b7408ec9eb00
MD5 c842aea1d1658c2225167845ffbb3c74
BLAKE2b-256 46a8b2bdca6c642daa2b68ab7c37487675b2609f27d1a5fdfb26dd07ac20b50e

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