jellycell.format.parse¶
Parse and write jellycell notebooks (jupytext percent format + PEP-723).
The flow, per spec §2.2:
parsestrips the PEP-723 block, runs :mod:jupytexton the remainder, then wraps the result in our :class:~jellycell.format.cells.NotebookIR.writere-emits via :mod:jupytextand re-inserts the raw PEP-723 block verbatim at the top.
Byte-exact round-trip is verified for canonical percent-format inputs. See
tests/unit/test_format_parse.py.
Module Contents¶
Functions¶
Read and parse a jellycell notebook from disk. |
|
Parse a jellycell notebook from a string. |
|
Write a jellycell notebook to disk. |
|
Serialize a :class: |
API¶
- jellycell.format.parse.parse(path: pathlib.Path) jellycell.format.cells.Notebook¶
Read and parse a jellycell notebook from disk.
- jellycell.format.parse.parse_text(text: str) jellycell.format.cells.Notebook¶
Parse a jellycell notebook from a string.
- jellycell.format.parse.write(notebook: jellycell.format.cells.Notebook, path: pathlib.Path) None¶
Write a jellycell notebook to disk.
- jellycell.format.parse.write_text(notebook: jellycell.format.cells.Notebook) str¶
Serialize a :class:
Notebookto jellycell percent-format text.