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

Method callback

dash/dash.py:1489–1510  ·  view source on GitHub ↗

Normally used as a decorator, `@app.callback` provides a server-side callback relating the values of one or more `Output` items to one or more `Input` items which will trigger the callback when they change, and optionally `State` items which provide additional inform

(self, *_args, **_kwargs)

Source from the content-addressed store, hash-verified

1487 )
1488
1489 def callback(self, *_args, **_kwargs) -> Callable[..., Any]:
1490 """
1491 Normally used as a decorator, `@app.callback` provides a server-side
1492 callback relating the values of one or more `Output` items to one or
1493 more `Input` items which will trigger the callback when they change,
1494 and optionally `State` items which provide additional information but
1495 do not trigger the callback directly.
1496
1497 The last, optional argument `prevent_initial_call` causes the callback
1498 not to fire when its outputs are first added to the page. Defaults to
1499 `False` unless `prevent_initial_callbacks=True` at the app level.
1500
1501
1502 """
1503 return _callback.callback(
1504 *_args,
1505 config_prevent_initial_callbacks=self.config.prevent_initial_callbacks,
1506 callback_list=self._callback_list,
1507 callback_map=self.callback_map,
1508 callback_api_paths=self.callback_api_paths,
1509 **_kwargs,
1510 )
1511
1512 def _inputs_to_vals(self, inputs):
1513 return inputs_to_vals(inputs)

Calls

no outgoing calls