references/notebook-structure.md
751 B查看源码Notebook Structure#
Jupyter notebooks are JSON documents with this high-level shape:
nbformatandnbformat_minormetadatacells(a list of markdown and code cells)
When editing .ipynb files programmatically:
- Preserve
nbformatandnbformat_minorfrom the template. - Keep
cellsas an ordered list; do not reorder unless intentional. - For code cells, set
execution_counttonullwhen unknown. - For code cells, set
outputsto an empty list when scaffolding. - For markdown cells, keep
cell_type="markdown"andmetadata={}.
Prefer scaffolding from the bundled templates or new_notebook.py (for example, $CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py) instead of hand-authoring raw notebook JSON.
文件内容是平台检查时读出的文本,只供查看。平台不会运行包里的任何脚本或程序。

