nbprint.config.core.Configuration¶
- pydantic model nbprint.config.core.Configuration[source]¶
Bases:
CallableModel,BaseModel- field name: str [Required]¶
- field resources: Annotated[dict[str, BaseModel], SerializeAsAny()] [Optional]¶
- field parameters: Annotated[Parameters, SerializeAsAny()] [Optional]¶
- field content: Annotated[ContentMarshall, SerializeAsAny()] [Optional]¶
- field overlays: Annotated[list[Overlay], SerializeAsAny()] [Optional]¶
Formatting overlays merged into ingested notebook cells.
- field layout_overlays: Annotated[list[LayoutOverlay], SerializeAsAny()] [Optional]¶
Layout overlays that wrap contiguous ranges of ingested cells in a flex container.
- field tags: Annotated[list[str], SerializeAsAny()] [Optional]¶
- field role: Role = Role.CONFIGURATION¶
- field ignore: bool = True¶
- field pagedjs: bool = True¶
- field debug: bool = True¶
- Configuration.convert_content_from_obj[source]
- generate(**_) list[NotebookNode][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
- static load(path_or_model: str | Path | dict | Configuration, name: str) Configuration[source]¶
- property context_type: Type[ContextType]¶
Return the context type for the model.
By default, it reads the value from the function signature (if a concrete value is provided), otherwise the implementation needs to be overridden.
- property result_type: Type[ResultType]¶
Return the result type for the model.
By default, it reads the value from the function signature (if a concrete value is provided), otherwise the implementation needs to be overridden.