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

Class ViewState

python-client/src/datapane/processors/types.py:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14@dc.dataclass
15class ViewState:
16 # maybe a FileHandler interface??
17 blocks: Blocks
18 file_entry_klass: dc.InitVar[t.Type[FileEntry]]
19 store: FileStore = dc.field(init=False)
20 view_xml: ViewXML = ""
21 entries: t.Dict[str, str] = dc.field(default_factory=dict)
22 dir_path: dc.InitVar[t.Optional[Path]] = None
23
24 def __post_init__(self, file_entry_klass, dir_path):
25 # TODO - should we use a lambda for file_entry_klass with dir_path captured?
26 self.store = FileStore(fw_klass=file_entry_klass, assets_dir=dir_path)
27
28
29P_IN = t.TypeVar("P_IN")

Callers 5

_view_to_xml_and_filesFunction · 0.90
build_reportFunction · 0.85
save_reportFunction · 0.85
stringify_reportFunction · 0.85
mk_null_pipeFunction · 0.85

Calls

no outgoing calls

Tested by 1

_view_to_xml_and_filesFunction · 0.72