Create Python API documentation in Markdown format
Pydoc-Markdown
Pydoc-Markdown is a tool and library to create Python API documentation in Markdown format based on lib2to3, allowing it to parse your Python code without executing it.
Pydoc-Markdown requires Python 3.7 or newer, however the code that you want to generate API documentation for can be for any Python version.
Features
- Understands multiple doc styles (Sphinx, Google, Pydoc-Markdown)
- Supports assignment docstrings (
#:
block before or string literal after the statement) - Links references to other documented API objects [WIP]
- [MkDocs][], Hugo and Docusaurus integration
Installation
Install Pydoc-Markdown from PyPI:
$ pipx install 'pydoc-markdown>=4.0.0,<5.0.0'
Quickstart (MkDocs)
$ pipx install mkdocs
$ pydoc-markdown --bootstrap mkdocs
$ pydoc-markdown --bootstrap readthedocs
$ pydoc-markdown --server --open
What this does:
- Install [MkDocs][]
- Create a
pydoc-markdown.yml