Skip to main content

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

Project description

Textfx v2.2

PyPI Downloads Python License Repo Size

Textfx is a lightweight Python library for creating dynamic, visually engaging console text effects.

What’s New in v2.2

  • Loading Animations: Added three new context‑managed loader classes:

    1. SpinnerLoading (classic spinning cursor)
    2. ProgressBarLoading (animated bar moving back and forth)
    3. GlitchLoading (random-character glitch effect)
  • API Consistency: All loaders share the same initialization parameters and with-syntax.

  • Examples Moved: Detailed usage examples are now located in docs/examples.md for a cleaner README.

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 (typeeffect)
  2. Scramble Effect (scrameffect)
  3. Wave Text (wavetext)
  4. Untyping Effect (untypeeffect)
  5. Unscramble Effect (unscrameffect)
  6. Unwave Text (unwavetext)
  7. Loading Animations (more new loading in v2.2)
  8. ✅ Color Support via termcolor

Usage

Import the desired effects and loaders:

from textfx import (
    typeeffect, scrameffect, wavetext,
    untypeeffect, unscrameffect, unwavetext,
    SpinnerLoading, ProgressBarLoading, GlitchLoading
)

For detailed examples, see docs/examples.md.

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", end_message="Complete!", delay=0.05
):
    do_work()

3. GlitchLoading

Random-character glitch effect:

with GlitchLoading(
    text="Decrypting...",
    end_message="Access Granted!",
    delay=0.1
):
    do_work()

Color Options

All effects support an optional color parameter (via termcolor):

grey, red, green, yellow, blue, magenta, cyan, white

Ensure your terminal supports ANSI colors for termcolor outputs.

Dependencies

Install dependencies:

pip install -r requirements.txt

📄 License

MIT License — see LICENSE.


Enjoy Textfx v2.2! 🎉

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.2.tar.gz (6.4 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.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for textfx-2.2.tar.gz
Algorithm Hash digest
SHA256 2109fe451294e76fa833025355d2758e8ef61fcee8083aa2fa2490f4f235540f
MD5 df6bb7e696aa39ad3d2e727aa6f774b1
BLAKE2b-256 e2bed0f56ac91ebba234917c36b61633b2e0a8f2609cc2f8358205769fd34e57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: textfx-2.2-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

Hashes for textfx-2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19b0a7eca2a6a822f0602409d9ef2e457fbd8fa7f7ab02cd3d23774e0e3d04fa
MD5 a2434b548fdb2b19127824952ca55c55
BLAKE2b-256 7fb42f6d80816a1597c48586f373db44ff859ad98563a0e370c12c49675e1692

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