mystquarto
Bidirectional MyST Markdown ↔ Quarto converter. Transforms directives, roles, config files, and frontmatter between the two formats.
Installation
pip install mystquarto
Or run directly:
uvx myst2quarto docs/
Usage
# Convert MyST → Quarto
myst2quarto docs/ -o docs-quarto/
# Convert Quarto → MyST
quarto2myst docs/ -o docs-myst/
# Unified CLI
mystquarto to-quarto docs/
mystquarto to-myst docs/
Options
| Flag | Description |
|---|---|
-o DIR / --output DIR |
Output directory (default: <input>-quarto/ or <input>-myst/) |
--in-place |
Modify files in-place |
--config-only |
Only convert config files (myst.yml ↔ _quarto.yml) |
--no-config |
Skip config file conversion |
--dry-run |
Show what would change without writing |
--strict |
Treat warnings as errors |
What it converts
Block directives
| MyST | Quarto |
|---|---|
```{code-cell} python |
```{python} |
:tags: [remove-input] |
#| echo: false |
:tags: [remove-output] |
#| output: false |
:tags: [remove-cell] |
#| include: false |
:tags: [hide-input] |
#| code-fold: true |
```{figure} path |
{#fig-id width=X} |
```{math} + :label: |
$$ ... $$ {#eq-id} |
```{note} |
::: {.callout-note} |
```{warning} |
::: {.callout-warning} |
```{tip} |
::: {.callout-tip} |
```{important} |
::: {.callout-important} |
```{admonition} Title |
::: {.callout-note title="Title"} |
::::{tab-set} / :::{tab-item} |
::: {.panel-tabset} / ## Label |
```{margin} |
::: {.column-margin} |
```{image} url |
{width=X} |
```{table} Caption |
Markdown table + : Caption {#tbl-id} |
```{bibliography} |
Removed (Quarto handles via config) |
```{tableofcontents} |
Removed (Quarto handles via config) |
```{mermaid} |
Pass through (both support it) |
Inline roles
| MyST | Quarto |
|---|---|
{eval}`expr` |
`{python} expr` |
{cite}`key` |
[@key] |
{cite:t}`key` |
@key |
{cite:p}`key` |
[@key] |
{cite}`a,b,c` |
[@a; @b; @c] |
{numref}`fig-id` |
@fig-id |
{ref}`label` |
@label |
{eq}`label` |
@eq-label |
{doc}`path` |
[path](path.qmd) |
Config files (myst.yml ↔ _quarto.yml)
myst.yml |
_quarto.yml |
|---|---|
project.title |
title: or book.title: |
project.authors |
author: |
project.bibliography |
bibliography: |
project.toc |
book.chapters: |
site.template: book-theme |
project.type: book |
project.exports[format: pdf] |
format.pdf: |
Frontmatter (per-file YAML)
| MyST | Quarto |
|---|---|
kernelspec: {name: python3} |
jupyter: python3 |
label: |
id: |
exports: |
format: |
Architecture
No heavy dependencies — just click + pyyaml. The converter uses a regex-based line scanner with a directive stack that handles nested fences (both backtick and colon styles), parses options blocks, and dispatches to transform functions. All transforms are bidirectional.
Development
git clone https://github.com/MaxGhenis/mystquarto
cd mystquarto
uv sync --dev
uv run pytest tests/ -v # 225 tests
uv run ruff check src/ tests/
License
MIT-0
Metadata
Release files for mystquarto 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mystquarto-0.1.2.tar.gz | 34.7 kB | Without provenance | Details for mystquarto-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mystquarto-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for mystquarto-0.1.2-py3-none-any.whl |
Total release size: 59.3 kB
Release files / mystquarto-0.1.2.tar.gz
| Download URL | mystquarto-0.1.2.tar.gz |
|---|---|
| Size | 34.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8acd5b7980f3fcd598cd931e616dba2212ce18e1efd0e2052b49cf2c7aa256fa
|
|
BLAKE2b-256 checksum How to use checksums |
342b6a384b31b65612931f714485399b46bf362a2aed9d77ae65bc40afa359be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mystquarto-0.1.2-py3-none-any.whl
| Download URL | mystquarto-0.1.2-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c33c1e7eae2ecd834d751e0fa327eb28d46f6e072faa27b6ffa416ea117296a5
|
|
BLAKE2b-256 checksum How to use checksums |
ef9450c523ca97d7f882ea6f9b4b0d2c6a94c521a396e3f56f1e71595b1ecbf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mystquarto 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.