collect_python.collect_python_blocks

convert.collect_python.collect_python_blocks(src_bytes, root)

Collect all fenced Python code blocks in the document.

Parameters

Name Type Description Default
src_bytes bytes UTF-8 encoded document source. required
root Node Root node of the parsed Markdown tree. required

Returns

Name Type Description
list of dict A list of metadata dictionaries, one per Python code block.