get_notebook_code_cells
- get_notebook_code_cells(notebook_path: str) tuple[bool, list[NotebookCell]] [source]
Parse a notebook and returns a Tuple.
The first entry being a bool which indicates if juypter magic was used and the second entry is a List of all code cells, as their dict representation.
- Parameters:
notebook_path (str) – Path to a notebook.
- Returns:
(
uses_get_ipython
,notebook_cells
), whereuses_get_ipython
is a bool, which isTrue
if any cell contained jupyter magic andnotebook_cells
is a List of all code cells dict representation.- Return type:
tuple[bool, list[NotebookCell]]
See also
- Warns:
InvalidNotebookWarning – If the notebook couldn’t be parsed.