MCPcopy
hub / github.com/reflex-dev/reflex / set

Method set

tests/integration/utils.py:286–297  ·  view source on GitHub ↗

Set a key in local storage. Args: key: The key to set. value: The value to set the key to.

(self, key, value)

Source from the content-addressed store, hash-verified

284 )
285
286 def set(self, key, value) -> None:
287 """Set a key in local storage.
288
289 Args:
290 key: The key to set.
291 value: The value to set the key to.
292 """
293 self.driver.execute_script(
294 f"window.{self.storage_key}.setItem(arguments[0], arguments[1]);",
295 key,
296 value,
297 )
298
299 def has(self, key) -> bool:
300 """Check if key is in local storage.

Callers 15

__setitem__Method · 0.95
connection_bannerFunction · 0.45
_event_log_append_notifyFunction · 0.45
set_pipelineFunction · 0.45
log_eventsFunction · 0.45
test_env_varFunction · 0.45
sendFunction · 0.45
enqueue_stream_deltaFunction · 0.45
_coro_blockerFunction · 0.45
test_state_proxyFunction · 0.45
bodyFunction · 0.45

Calls

no outgoing calls

Tested by 15

connection_bannerFunction · 0.36
test_env_varFunction · 0.36
sendFunction · 0.36
enqueue_stream_deltaFunction · 0.36
_coro_blockerFunction · 0.36
test_state_proxyFunction · 0.36
bodyFunction · 0.36
create_server_and_testFunction · 0.36
test_is_prod_modeFunction · 0.36
modify_1Function · 0.36