MCPcopy Create free account
hub / github.com/datapane/datapane / num_blocks

Function num_blocks

python-client/tests/client/views/test_views.py:33–35  ·  view source on GitHub ↗
(view_str: str)

Source from the content-addressed store, hash-verified

31
32
33def num_blocks(view_str: str) -> int:
34 x = "count(/View//*)"
35 return int(load_doc(view_str).xpath(x))
36
37
38def _view_to_xml_and_files(app_or_view: t.Union[dp.Blocks, dp.App]) -> ViewState:

Callers 1

assert_viewFunction · 0.85

Calls 1

load_docFunction · 0.90

Tested by

no test coverage detected