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
- 14 built-in progress-bar styles
- Single-line in-place progress by default
- Iterator, context-manager and decorator progress APIs
- Multi-progress and indeterminate progress
- File/download-style byte progress
- 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
- Keyboard callback registry and plugin base class
loadfxCLI- 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)
Progress bars
Progress bars redraw one terminal line by default. They do not print a new line for every update.
Basic
from loadfx import ProgressBar
import time
bar = ProgressBar(100, label="Downloading", show_eta=True, show_speed=True)
for i in range(101):
bar.update(i)
time.sleep(0.02)
Different styles
for style in ["classic", "dots", "blocks", "stars", "braille", "squares"]:
bar = ProgressBar(100, style=style, label=style.title())
for i in range(101):
bar.update(i)
Available styles:
classic, blocks, dots, dotline, small-dots, arrows, squares, circles, braille, pulse, bars, hash, equals, stars.
Step updates
bar = ProgressBar(100, label="Installing")
for _ in range(20):
install_step()
bar.update(step=5)
Context manager
with ProgressBar(100, label="Building") as bar:
for i in range(101):
build_step()
bar.update(i)
Iterator helper
from loadfx import track
for filename in track(files, label="Scanning", style="dots"):
scan(filename)
Indeterminate progress
Use this when the total is unknown:
from loadfx import ProgressBar
bar = ProgressBar.indeterminate("Connecting")
bar.start()
connect_to_server()
bar.stop("Connected")
Multiple bars
from loadfx import MultiProgress
with MultiProgress() as progress:
download = progress.add("Download", 100, style="dots")
extract = progress.add("Extract", 100, style="blocks")
install = progress.add("Install", 100, style="stars")
for i in range(101):
download.update(i)
extract.update(min(i, 100))
install.update(min(i * 2, 100))
progress.refresh()
Colors
bar = ProgressBar(
100,
style="dots",
foreground="cyan",
background="black",
)
256-color values are also supported:
bar = ProgressBar(100, foreground=51, background=235)
Custom characters
bar = ProgressBar(
100,
custom_fill="▓",
custom_empty="░",
)
Custom output format
bar = ProgressBar(
100,
format_string="{label} [{bar}] {percent:.0f}% | {speed:.1f}/s | ETA {eta:.1f}s",
)
Supported fields include label, bar, percent, current, total, speed, eta and elapsed.
Stream mode
If you intentionally want every update on its own line:
bar = ProgressBar(10, mode="stream")
for i in range(11):
bar.update(i)
The default is mode="single".
Loading effects
from loadfx import Loader
import time
with Loader("Processing", effect="matrix"):
time.sleep(2)
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.
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()
License
MIT License. See the repository for the complete source and release history.
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 loadfx-2.3.3.tar.gz.
File metadata
- Download URL: loadfx-2.3.3.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3e950db0561986cc873c430d713e4684fde7c0857adaba639900b7a00f768d5
|
|
| MD5 |
493d307d1c955bbd5e1cf17381d3a42d
|
|
| BLAKE2b-256 |
e61c092ffc200aa17f80e5246f8c0bfe7f6fdf4f00e2874878791be6be32df9f
|
Provenance
The following attestation bundles were made for loadfx-2.3.3.tar.gz:
Publisher:
publish.yml on tivalsdeveloper-oss/loadfx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loadfx-2.3.3.tar.gz -
Subject digest:
c3e950db0561986cc873c430d713e4684fde7c0857adaba639900b7a00f768d5 - Sigstore transparency entry: 2498084280
- Sigstore integration time:
-
Permalink:
tivalsdeveloper-oss/loadfx@2a4150b5e3fc013776ca95c1d329139b0ea3f71c -
Branch / Tag:
refs/tags/v2.3.3 - Owner: https://github.com/tivalsdeveloper-oss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a4150b5e3fc013776ca95c1d329139b0ea3f71c -
Trigger Event:
release
-
Statement type:
File details
Details for the file loadfx-2.3.3-py3-none-any.whl.
File metadata
- Download URL: loadfx-2.3.3-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99ad6c803ef013a49f41863fe8fac55cc0b71f923d266261576d36e9787a08c5
|
|
| MD5 |
44a64befe3a881c0b070dd1eb3db8b0d
|
|
| BLAKE2b-256 |
e798d310ea6647a67086db830d511b4ab4d104a33542e9cf4e4870db48c84b10
|
Provenance
The following attestation bundles were made for loadfx-2.3.3-py3-none-any.whl:
Publisher:
publish.yml on tivalsdeveloper-oss/loadfx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loadfx-2.3.3-py3-none-any.whl -
Subject digest:
99ad6c803ef013a49f41863fe8fac55cc0b71f923d266261576d36e9787a08c5 - Sigstore transparency entry: 2498084287
- Sigstore integration time:
-
Permalink:
tivalsdeveloper-oss/loadfx@2a4150b5e3fc013776ca95c1d329139b0ea3f71c -
Branch / Tag:
refs/tags/v2.3.3 - Owner: https://github.com/tivalsdeveloper-oss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a4150b5e3fc013776ca95c1d329139b0ea3f71c -
Trigger Event:
release
-
Statement type: