Tip
The published converted results are in the
peps branch, and
GitHub Actions
refreshes them daily.
Tool for mirroring the python/peps repository into Markdown files.
- Filename format:
PEP {Num:04d} – {Title}.md(4-digit zero padding) - YAML frontmatter: original PEP metadata + normalized fields
- Index generation:
output/index/peps.json,output/index/status_final.json - Status query:
pep2md query --status Final - Incremental sync:
pep2md sync - On-demand HTTP fetch for PEP
.rstfiles (no full repo clone required) - Internal PEP links rewritten to relative paths
With uv:
uv sync --extra devWith pip:
python -m pip install -e ".[dev]"# sync
pep2md sync # Incremental sync: fetch changed PEPs and update outputs/index
pep2md sync --full # Force full regeneration for the current selection
pep2md sync --peps 8,20,333 # Sync only specific PEP numbers
pep2md sync --no-index --no-cache # Skip index and cache state for this run
pep2md sync --suppress-pandoc-warnings # Suppress pandoc warnings (--quiet)
# query
pep2md query --status Final --format table # Show Final PEPs in table format
pep2md query --meta source_path=pep-0008.rst --meta author=Guido --format json # Filter by metadata (AND) and print JSON
pep2md query --status Active --format jsonl # Emit one JSON object per lineTip
If you installed with uv, add uv run in front.
Such as:
uv run pep2md sync --full
output/peps/*.mdoutput/index/peps.jsonoutput/index/status_final.jsoncache/state.json
- Default dependency is
pypandoc_binary; systempandoccan also be used when available. - As an alternative, you can use
pypandoc.pandoc_download.download_pandoc(). --fullforces full rebuild but still reads/updatescache/state.json.--no-cacheruns without reading/writingcache/state.json(stateless run).--suppress-pandoc-warningsruns pandoc with--quietto suppress warnings.