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

Method set_prop

dash/backends/ws.py:112–127  ·  view source on GitHub ↗

Send immediate prop update to the client via WebSocket. Queues the message for the sender coroutine to send. Args: component_id: The component ID (string or stringified dict) prop_name: The property name to update value: The new value to set

(self, component_id: str, prop_name: str, value: Any)

Source from the content-addressed store, hash-verified

110 outbound_queue.sync_q.put_nowait(cast(str, to_json(msg)))
111
112 async def set_prop(self, component_id: str, prop_name: str, value: Any) -> None:
113 """Send immediate prop update to the client via WebSocket.
114
115 Queues the message for the sender coroutine to send.
116
117 Args:
118 component_id: The component ID (string or stringified dict)
119 prop_name: The property name to update
120 value: The new value to set
121 """
122 msg = {
123 "type": "set_props",
124 "rendererId": self._renderer_id,
125 "payload": {"componentId": component_id, "props": {prop_name: value}},
126 }
127 self._queue_message(msg)
128
129 async def get_prop(
130 self, component_id: str, prop_name: str, timeout: float = 30.0

Callers 2

_send_propsFunction · 0.80
set_via_wsFunction · 0.80

Calls 1

_queue_messageMethod · 0.95

Tested by 1

set_via_wsFunction · 0.64