srush / pydoc-markdown

Create Python API documentation in Markdown format.

Home Page:http://niklasrosenstein.github.io/pydoc-markdown/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pydoc-Markdown

Python versions Pypi version Build status Gitter chat

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. To run Pydoc-Markdown, you need to use at least Python 3.7.

>> Go to the Documentation

Installation

I recommend to install Pydoc-Markdown using Pipx.

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

If you need access to the Pydoc-Markdown CLI instead, because you rely on the "old-style" pre-4.6.0 YAML configuration, you should install the package directly through Pipx.

$ pipx install pydoc-markdown

Note: You can also use pipx install pydoc-markdown[novella] --include-deps, but be aware that this also adds other programs in Pydoc-Markdown's dependency tree to your PATH.

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)

News

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!

About

Create Python API documentation in Markdown format.

http://niklasrosenstein.github.io/pydoc-markdown/

License:Other


Languages

Language:Python 100.0%