Skip to main content

loadfx 2.2

Zero-dependency Python terminal effects and UI toolkit.

LOADFX provides loading animations, progress bars, text effects, menus, widgets, themes, logging and terminal UI primitives without runtime dependencies.

Install

python -m pip install loadfx

Highlights

  • 24+ built-in loading effects and custom frames
  • 12 built-in progress-bar styles
  • Foreground and background colors, including 256-color values
  • Progress percentage, speed and ETA reporting
  • Custom progress-bar fill and empty characters
  • Text colors, formatting, RGB, rainbow and gradient effects
  • Typing, banners and boxes
  • List, dictionary and nested menus
  • Multi-select menus
  • Tables, panels, trees and dashboard primitives
  • Terminal forms, file browser, command palette and app shell
  • Notifications and structured logging
  • Built-in themes and task runner
  • Typewriter, slide, fade-in and glitch animations
  • Keyboard callback registry and plugin base class
  • loadfx CLI
  • Python 3.8+
  • Zero runtime dependencies

Quick start

from loadfx import Loader, TextFX, Menu
import time

print(TextFX.rainbow("LOADFX"))
with Loader("Starting", effect="wave"):
    time.sleep(1)
choice = Menu({"Start": "start", "Settings": "settings", "Exit": "exit"}).show()
print(choice)

Loading effects

from loadfx import Loader
import time

with Loader("Processing", effect="matrix"):
    time.sleep(2)

# Custom frames
Loader("Processing", frames=["[   ]", "[=  ]", "[== ]", "[===]"]).start()

Built-in loading effects include dots, spinner, line, arrows, bounce, pulse, circle, square, braille, clock, wave, bars, blocks, grow, shrink, orbit, arc, snake, ping, heart, star, matrix, scan, and moon.

Progress bars

Basic progress bar

from loadfx import ProgressBar
import time

bar = ProgressBar(100, show_eta=True, show_speed=True)
for i in range(101):
    bar.update(i)
    time.sleep(0.02)

Progress-bar styles

LOADFX includes these built-in styles:

Style Fill Empty
classic
blocks
dots
dotline
arrows > -
squares
circles
braille
pulse ·
bars
hash # -
equals = -

Example:

from loadfx import ProgressBar

bar = ProgressBar(100, width=40, style="dots")
for i in range(101):
    bar.update(i)

Foreground and background colors

Use named terminal colors or integer 256-color indexes:

bar = ProgressBar(
    100,
    style="dots",
    foreground="cyan",
    background="black",
)

256-color example:

bar = ProgressBar(
    100,
    style="blocks",
    foreground=51,
    background=235,
)

Supported named foreground/background colors include black, red, green, yellow, blue, magenta, cyan, white, gray, and their bright_* variants.

Custom progress characters

bar = ProgressBar(
    100,
    style="dots",
    custom_fill="▓",
    custom_empty="░",
)

Runtime customization

bar = ProgressBar(100, style="classic")

bar.set_style("braille")
bar.set_colors("green", "black")
bar.set_message("Installing")
bar.update(75)

update() also accepts step=, message=, and progress=. Use finish() to complete the bar.

Forms

from loadfx import Form

form = Form("Create Account")
form.input("username", required=True)
form.password("password", required=True)
form.input("email", required=True)
result = form.show()

App shell

from loadfx import App

App("My App").header("LOADFX").main("Hello terminal").footer("Ready").run()

Widgets and tools

from loadfx import Table, Panel, Tree, FileBrowser, CommandPalette

Table(["Name", "Status"], [["loadfx", "Active"]], style="rounded").show()
Panel("Terminal toolkit", title="loadfx").show()
Tree("Project").add("src/loadfx").add("tests").show()

Themes and animations

from loadfx import Theme, Animation

Theme.use("cyberpunk")
Animation.fade_in("Welcome")
Animation.glitch("SYSTEM")

CLI

loadfx version
loadfx effects
loadfx themes
loadfx demo

API

Loader, Spinner, ProgressBar, TextFX, Menu, MultiMenu, Table, Panel, Tree, Dashboard, Terminal, notify, Logger, Theme, Tasks, Animation, Form, FileBrowser, CommandPalette, keyboard, Plugin, and App.

License

MIT — Tivalsdeveloper

Download files

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

Source Distribution

loadfx-2.2.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

loadfx-2.2.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file loadfx-2.2.0.tar.gz.

File metadata

  • Download URL: loadfx-2.2.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for loadfx-2.2.0.tar.gz
Algorithm Hash digest
SHA256 7ad1376daf5f939c188c637b4a6acc98a1cf0f2091bc0efac19bcd758733f3b5
MD5 2bf2f273facb7023b9c53afec6024d93
BLAKE2b-256 1ab8776119e665cb0c4d515d761ef88aceaff3ebdba61b2f3993e234846c17a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for loadfx-2.2.0.tar.gz:

Publisher: publish.yml on tivalsdeveloper-oss/loadfx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file loadfx-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: loadfx-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for loadfx-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db8d6d04b2ca67cf36f9e97cfa3f4568646ea3efbca2ee4d49b599a6e9633e94
MD5 951a5f4d61c75064b5c58d716dbaf895
BLAKE2b-256 15740487310bc9e189714657980a7513e8425cfdb2440a01d160fc58c2ba790f

See more details on using hashes here.

Provenance

The following attestation bundles were made for loadfx-2.2.0-py3-none-any.whl:

Publisher: publish.yml on tivalsdeveloper-oss/loadfx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page