MCPcopy Index your code
hub / github.com/NiklasRosenstein/pydoc-markdown

github.com/NiklasRosenstein/pydoc-markdown @v4.8.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.8.2 ↗ · + Follow
306 symbols 1,110 edges 63 files 93 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pydoc-Markdown 📃

Python versions Pypi version

Pydoc-Markdown is a tool to create Python API documentation in Markdown format. Instead of executing your Python code like so many other documentation tools, it parses it using docspec instead.

→ Go to the Documentation 📘

Table of Contents

Installation 📦

You can install Pydoc-Markdown using Pipx:

$ pipx install pydoc-markdown

If you plan on using the Novella integration, you may want to install it as:

$ pipx install novella
$ pipx inject novella pydoc-markdown[novella]

You need at least Python 3.7 to run Pydoc-Markdown. The Python version compatibility of the package you are looking to generate documentation for is irrelevant.

Features 🌟

  • Understands multiple documentation styles (Sphinx, Google, Pydoc-Markdown specific) and converts them to properly formatted Markdown
  • Can parse docstrings for variables thanks to docspec (#: block before or string literal after the statement)
  • Generates links to other API objects per the documentation syntax (e.g. #OtherClass for the Pydoc-Markdown style)
  • Configure the output using a YAML file or pyProject.toml, then you're only one command away to generate the documentation in Markdown format
  • Or use Novella to tightly integrate with static site generators like MkDocs and Hugo with with additional features such as Markdown pre-processing

News 📢

4.7.0 (Undeprecating YAML configuration)

Many users prefer the YAML configuration over the using Novella, which is why starting with 4.7.0, the YAML style configuration is officially un-deprecated and will continue to be supported.

4.6.0 (Novella integration)

Starting with 4.6.0, development focuses on integrating with Novella and use it as a replacement for tool-specific renderers thus far provided directly by Pydoc-Markdown (i.e. integrations with MkDocs, Hugo and Docusuraus). Such integrations are/will be provided by Novella instead.

With the Novella integration, you can now place generated API content in Markdown format inline with your existing Markdown documentation source files using @pydoc tags. Check out the Documentation for more information on how to use Pydoc-Markdown with Novella.

The old style of using Pydoc-Markdown with a YAML or PyProject configuration to generate files and kick off the build is now deprecated but will be maintained for the foreseeable future (at least until the next major version bump). It is strongly recommended to migrate your existing projects to using the Novella build backend.

Contributing to Pydoc-Markdown 🤝

All contributions are welcome! Check out the Contribution Guidelines.

Questions / Need help? 🤔

Feel free to open a topic on GitHub Discussions!

Projects using Pydoc-Markdown 📚

An incomplete list of projects that use Pydoc-Markdown to generate their API documentation. Feel free to open a pull request to add your project to this list!

Core symbols most depended-on inside this repo

append
called by 40
src/pydoc_markdown/util/knownfiles.py
assert_processor_result
called by 15
test/processors/__init__.py
error
called by 11
src/pydoc_markdown/main.py
load_config
called by 9
src/pydoc_markdown/__init__.py
_is_method
called by 8
src/pydoc_markdown/contrib/renderers/markdown.py
open
called by 7
src/pydoc_markdown/util/knownfiles.py
load
called by 6
src/pydoc_markdown/interfaces.py
assert_text_equals
called by 5
test/utils.py

Shape

Method 177
Class 67
Function 60
Route 2

Languages

Python100%

Modules by API surface

src/pydoc_markdown/contrib/renderers/markdown.py31 symbols
src/pydoc_markdown/interfaces.py29 symbols
src/pydoc_markdown/contrib/renderers/hugo.py27 symbols
src/pydoc_markdown/contrib/source_linkers/git.py18 symbols
src/pydoc_markdown/contrib/renderers/mkdocs.py14 symbols
src/pydoc_markdown/util/pages.py13 symbols
src/pydoc_markdown/util/docspec.py13 symbols
src/pydoc_markdown/__init__.py11 symbols
src/pydoc_markdown/novella/preprocessor.py10 symbols
src/pydoc_markdown/main.py10 symbols
src/pydoc_markdown/contrib/renderers/jinja2.py10 symbols
src/pydoc_markdown/util/knownfiles.py9 symbols

For agents

$ claude mcp add pydoc-markdown \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page