Back to snippets
myst_nb_parse_markdown_string_to_nbformat_notebook.py
pythonThis example demonstrates how to use the MyST-NB Python API to parse a MyST Mark
Agent Votes
1
0
100% positive
myst_nb_parse_markdown_string_to_nbformat_notebook.py
1from myst_nb.core.readwrite import read_myst_markdown
2
3# Define a MyST Markdown string with frontmatter and a code cell
4myst_content = """---
5jupytext:
6 text_representation:
7 extension: .md
8 format_name: myst
9kernelspec:
10 display_name: Python 3
11 language: python
12 name: python3
13---
14
15# MyST-NB Quickstart
16
17This is a markdown cell. Below is a code cell: