functualize-flow-viz
Status: Published — Independently installable from PyPI.
Inline execution tree visualization plugin for functualize. Renders a live job execution tree in the terminal showing step status, durations, and nested invocations updating in real time. Automatically detects TTY capabilities and falls back to structured plain-text output for non-interactive terminals.
Installation
pip install functualize-flow-viz
Quick Start
from functualize_flow_viz import FlowVizPlugin
# Register the plugin with your functualize app
plugin = FlowVizPlugin()
plugin.on_job_start("deploy", {"env": "production"})
plugin.on_log("info", "Starting deployment...")
plugin.on_invoke_start("migrate", {"target": "latest"})
plugin.on_invoke_end("migrate", None)
plugin.on_job_end("deploy", None)
Features
- Live execution tree — Renders a real-time tree of job execution with status icons (⏳ running, ✓ success, ✗ failure, ○ pending, ⊘ timeout)
- Nested invocation tracking — Shows
rc.invoke()calls as indented children in the tree, preserving parent-child relationships - Real-time duration refresh — Background thread updates elapsed durations at ≤1s intervals for running nodes
- TTY auto-detection — Uses ANSI inline rendering on interactive terminals; falls back to plain-text output for piped/CI environments
- Custom event handling — Renders domain-specific visualizations including progress bars for events with progress payloads
- Log streaming — Buffers log messages and prints them above the inline tree widget to avoid visual corruption
API Reference
Public classes and functions exported by this plugin:
FlowVizPlugin— Main plugin class implementing the OutputRenderer protocol. Auto-selects between TTY and plain-text rendering. Methods:on_job_start(job_name, metadata)— Initialize the execution tree for a jobon_log(level, message)— Render a log messageon_status_change(old_status, new_status, message)— Handle status transitionson_phase_change(step, action)— Add or update a job phase nodeon_invoke_start(child_job_name, kwargs)— Begin tracking a nested invocationon_invoke_end(child_job_name, result)— Complete a nested invocationon_job_end(job_name, result)— Finalize the tree and render final stateon_event(event)— Handle custom structured eventsrender_log(message, level)— OutputRenderer protocol: render logrender_phase(phase, status)— OutputRenderer protocol: render phase updaterender_progress(current, total, label)— OutputRenderer protocol: render progress
Internal (non-public) classes used by FlowVizPlugin:
TreeNode— Dataclass representing a node in the execution tree with label, status, timing, and childrenInlineTTYRenderer— ANSI-based renderer for interactive terminals with background refreshPlainTextRenderer— Fallback renderer producing structured plain-text without escape sequences
Development
Run plugin tests:
uv run pytest plugins/functualize-flow-viz/tests/ -v
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 functualize_flow_viz-0.1.0.tar.gz.
File metadata
- Download URL: functualize_flow_viz-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7d3ce818cbe223d3d8543aec56d8d2f3c01c42a35d4dc38910230f278ac7cc7
|
|
| MD5 |
f181ae13c6c387a6af4914320276bd9b
|
|
| BLAKE2b-256 |
e21f274f612c3f647753700385ac6b2c04e2dac85ce75f1ad15d1be683eb9185
|
File details
Details for the file functualize_flow_viz-0.1.0-py3-none-any.whl.
File metadata
- Download URL: functualize_flow_viz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
017b32aa58267c538cadac8f0006467fdfea55fd269fb99615003a07204dcb0b
|
|
| MD5 |
0483bdae436c8f278d35c4d3d4fbff10
|
|
| BLAKE2b-256 |
64fd591ec3977c2b01d70232c78afd47f4e7a56de885809e420f19d76691cc96
|