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

Method __init__

python-client/src/datapane/blocks/layout.py:89–110  ·  view source on GitHub ↗

Args: *arg_blocks: Blocks to add to Page blocks: Allows providing the report blocks as a single list title: The page title (optional) name: A unique id for the Page to aid querying (optional) !!! tip Page can be passed usi

(
        self,
        *arg_blocks: BlockOrPrimitive,
        blocks: t.List[BlockOrPrimitive] = None,
        title: str = None,
        name: BlockId = None,
    )

Source from the content-addressed store, hash-verified

87 _tag = "_Page"
88
89 def __init__(
90 self,
91 *arg_blocks: BlockOrPrimitive,
92 blocks: t.List[BlockOrPrimitive] = None,
93 title: str = None,
94 name: BlockId = None,
95 ):
96 """
97 Args:
98 *arg_blocks: Blocks to add to Page
99 blocks: Allows providing the report blocks as a single list
100 title: The page title (optional)
101 name: A unique id for the Page to aid querying (optional)
102
103 !!! tip
104 Page can be passed using either arg parameters or the `blocks` kwarg, e.g. `dp.Page(group, select)` or `dp.Group(blocks=[group, select])`
105 """
106 self.title = title
107 super().__init__(*arg_blocks, blocks=blocks, label=title, name=name)
108
109 if any(isinstance(b, Page) for b in self.blocks):
110 raise DPClientError("Nested pages not supported, please use Selects and Groups")
111
112
113class Select(ContainerBlock):

Callers 4

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

DPClientErrorClass · 0.90

Tested by

no test coverage detected