MCPcopy
hub / github.com/plotly/dash / state_app

Function state_app

tests/unit/mcp/tools/test_mcp_tools.py:80–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79@pytest.fixture
80def state_app():
81 app = Dash(__name__)
82 app.layout = html.Div(
83 [
84 html.Button(id="btn"),
85 dcc.Input(id="inp"),
86 html.Div(id="out"),
87 ]
88 )
89
90 @app.callback(
91 Output("out", "children"),
92 Input("btn", "n_clicks"),
93 State("inp", "value"),
94 )
95 def update(clicks, val):
96 return val
97
98 app_context.set(app)
99 app.mcp_callback_map = CallbackAdapterCollection(app)
100 return app
101
102
103@pytest.fixture

Callers

nothing calls this directly

Calls 3

DashClass · 0.90
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…