nbprint.config.core.Page

pydantic model nbprint.config.core.Page[source]

Bases: BaseModel

field top: Annotated[PageRegion, SerializeAsAny()] | None = None
field top_left: Annotated[PageRegion, SerializeAsAny()] | None = None
field top_left_corner: Annotated[PageRegion, SerializeAsAny()] | None = None
field top_right: Annotated[PageRegion, SerializeAsAny()] | None = None
field top_right_corner: Annotated[PageRegion, SerializeAsAny()] | None = None
field bottom: Annotated[PageRegion, SerializeAsAny()] | None = None
field bottom_left: Annotated[PageRegion, SerializeAsAny()] | None = None
field bottom_left_corner: Annotated[PageRegion, SerializeAsAny()] | None = None
field bottom_right: Annotated[PageRegion, SerializeAsAny()] | None = None
field bottom_right_corner: Annotated[PageRegion, SerializeAsAny()] | None = None
field left: Annotated[PageRegion, SerializeAsAny()] | None = None
field left_top: Annotated[PageRegion, SerializeAsAny()] | None = None
field left_bottom: Annotated[PageRegion, SerializeAsAny()] | None = None
field right: Annotated[PageRegion, SerializeAsAny()] | None = None
field right_top: Annotated[PageRegion, SerializeAsAny()] | None = None
field right_bottom: Annotated[PageRegion, SerializeAsAny()] | None = None
field counter_reset: bool = False
field counter_style: str | None = None
field size: PageSize | tuple[float, float] | None = PageSize.letter
field orientation: PageOrientation | None = PageOrientation.portrait
field css: str = ''
classmethod convert_region_from_obj(v, region) PageRegion[source]
Page.convert_top_from_obj[source]
Page.convert_top_left_from_obj[source]
Page.convert_top_left_corner_from_obj[source]
Page.convert_top_right_from_obj[source]
Page.convert_top_right_corner_from_obj[source]
Page.convert_bottom_from_obj[source]
Page.convert_bottom_left_from_obj[source]
Page.convert_bottom_left_corner_from_obj[source]
Page.convert_bottom_right_from_obj[source]
Page.convert_bottom_right_corner_from_obj[source]
Page.convert_left_from_obj[source]
Page.convert_left_top_from_obj[source]
Page.convert_left_bottom_from_obj[source]
Page.convert_right_from_obj[source]
Page.convert_right_top_from_obj[source]
Page.convert_right_bottom_from_obj[source]
generate(metadata: dict, config: Configuration, parent: BaseModel, attr: str = 'page', **_) NotebookNode | list[NotebookNode] | None[source]

Generate a notebook node for this model. This will be called before the runtime of the notebook, use it for code generation.

Args:

metadata (dict): common cell metadata

Returns:

NotebookNode: the content of the notebook node