pyplot-style convenience layer for Plotly Dash — build interactive apps top-to-bottom with no boilerplate.
pip install dash-interactfrom dash_interact import page
page.H1("My App")
@page.interact
def sine_wave(amplitude: float = 1.0, frequency: float = 2.0):
import numpy as np, plotly.graph_objects as go
x = np.linspace(0, 6 * np.pi, 600)
return go.Figure(go.Scatter(x=x, y=amplitude * np.sin(frequency * x)))
page.run()page works like matplotlib.pyplot — a module-level singleton that accumulates content.
from dash_interact import page
page.H1("Title") # adds html.H1
page.Hr() # adds html.Hr
@page.interact # adds an interact panel
def my_fn(...): ...
page.run() # builds the Dash app and starts the serverThree levels mirroring ipywidgets:
from dash_interact import interact, interactive, interactive_output
# 1. Fire and forget — attaches to the current page
@interact
def plot(amplitude: float = 1.0): ...
# 2. Embeddable — place it yourself
panel = interactive(plot, amplitude=(0, 2, 0.1))
# 3. Fully decoupled — pre-built form, separate output
form = FnForm("plot", plot)
output = interactive_output(plot, form)MIT