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

Method __init__

python-client/src/datapane/blocks/asset.py:28–42  ·  view source on GitHub ↗
(
        self,
        data: t.Optional[t.Any] = None,
        file: t.Optional[Path] = None,
        caption: str = "",
        name: t.Optional[BlockId] = None,
        label: t.Optional[str] = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

26
27 # TODO - we may need to support file here as well to handle media, etc.
28 def __init__(
29 self,
30 data: t.Optional[t.Any] = None,
31 file: t.Optional[Path] = None,
32 caption: str = "",
33 name: t.Optional[BlockId] = None,
34 label: t.Optional[str] = None,
35 **kwargs,
36 ):
37 # storing objects for delayed upload
38 super().__init__(name=name, label=label, **kwargs)
39 self.data = data
40 self.file = file
41 self.caption = caption
42 self.file_attribs: SSDict = dict()
43
44 def get_file_attribs(self) -> SSDict:
45 return self.file_attribs

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected