converter.convert_qmd_to_py

convert.converter.convert_qmd_to_py(
    qmd_path,
    linter=None,
    formatter=None,
    output_path=None,
    *,
    verbose=False,
    lint_non_exec=False,
)

Convert Quarto file to Python file, preserving line alignment.

Parameters

Name Type Description Default
qmd_path str | Path Path to the input .qmd file. required
linter str Name of the linter that will be used. None
formatter str Name of the formatter that will be used. None
output_path str | Path | None Path for the output .py file. If None, uses qmd_path with .py suffix. None
verbose bool If True, print detailed progress information. False
lint_non_exec bool If True, also lint non-executable Python code chunks. False

Returns

Name Type Description
output_path Path | None Path for the output .py file, or None if there was an error.