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

Method items

tests/integration/utils.py:247–258  ·  view source on GitHub ↗

Get all items in local storage. Returns: A dict mapping keys to values.

(self)

Source from the content-addressed store, hash-verified

245 )
246
247 def items(self) -> dict[str, str]:
248 """Get all items in local storage.
249
250 Returns:
251 A dict mapping keys to values.
252 """
253 return self.driver.execute_script(
254 f"var ls = window.{self.storage_key}, items = {{}}; "
255 "for (var i = 0, k; i < ls.length; ++i) "
256 " items[k = ls.key(i)] = ls.getItem(k); "
257 "return items; "
258 )
259
260 def keys(self) -> list[str]:
261 """Get all keys in local storage.

Callers 15

__init__Method · 0.80
add_hooksMethod · 0.80
createMethod · 0.80
__init__.pyFile · 0.80
_component_map_hashMethod · 0.80
createMethod · 0.80
_validate_dictFunction · 0.80
_filter_dictMethod · 0.80
deploy_commandFunction · 0.80
_parse_envsFunction · 0.80

Calls

no outgoing calls

Tested by 15

test_clear_filesFunction · 0.64
test_upload_chunk_fileFunction · 0.64
test_client_side_stateFunction · 0.64
assert_be_noneMethod · 0.64
compare_dict_of_varFunction · 0.64
test_replace_defaultsFunction · 0.64
test_env_fileFunction · 0.64
test_event_var_dataFunction · 0.64
test_sendFunction · 0.64