nbprint.config.core.Context¶
- pydantic model nbprint.config.core.Context[source]¶
Bases:
BaseModel- field tags: Annotated[list[str], SerializeAsAny()] [Optional]¶
- field role: Role = Role.CONTEXT¶
- field ignore: bool = True¶
- field parameters: Annotated[Parameters, SerializeAsAny()] | None = None¶
- generate(metadata: dict, config: Configuration, parent: BaseModel, attr: str = '', **kwargs) 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