MCPcopy Index your code
hub / github.com/plotly/dash / _app_with_callback

Function _app_with_callback

tests/unit/mcp/conftest.py:70–79  ·  view source on GitHub ↗

Create a Dash app with one callback using ``component`` as Input.

(component, input_prop="value", output_id="out")

Source from the content-addressed store, hash-verified

68
69
70def _app_with_callback(component, input_prop="value", output_id="out"):
71 """Create a Dash app with one callback using ``component`` as Input."""
72 app = Dash(__name__)
73 app.layout = html.Div([component, html.Div(id=output_id)])
74
75 @app.callback(Output(output_id, "children"), Input(component.id, input_prop))
76 def update(val):
77 return f"got: {val}"
78
79 return _setup_mcp(app)
80
81
82def _schema_for(tool, param_name=None):

Calls 2

DashClass · 0.90
_setup_mcpFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…