Skip to content

NotebookEditInput

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  2429547289["input_types.NotebookEditInput"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 2429547289
  2751680898 --> 2645524081

🛈 DocStrings

Bases: TypedDict

Input for the NotebookEdit tool. Edits cells in Jupyter notebook files.

Source code in src/clawd_code_sdk/models/input_types.py
@_extra_allow
class NotebookEditInput(TypedDict):
    """Input for the NotebookEdit tool. Edits cells in Jupyter notebook files."""

    notebook_path: str
    """The absolute path to the Jupyter notebook file."""
    new_source: str
    """The new source for the cell."""
    cell_id: NotRequired[str]
    """The ID of the cell to edit."""
    cell_type: NotRequired[Literal["code", "markdown"]]
    """The type of the cell (code or markdown)."""
    edit_mode: NotRequired[Literal["replace", "insert", "delete"]]
    """The type of edit (replace, insert, delete)."""

cell_id instance-attribute

cell_id: NotRequired[str]

The ID of the cell to edit.

cell_type instance-attribute

cell_type: NotRequired[Literal['code', 'markdown']]

The type of the cell (code or markdown).

edit_mode instance-attribute

edit_mode: NotRequired[Literal['replace', 'insert', 'delete']]

The type of edit (replace, insert, delete).

new_source instance-attribute

new_source: str

The new source for the cell.

notebook_path instance-attribute

notebook_path: str

The absolute path to the Jupyter notebook file.

:fa-brands-github: Show source on GitHub