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,
)
| 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 | |
| 113 | class Select(ContainerBlock): |
no test coverage detected