skillfed

mkdocstrings

Automatic documentation from sources, for MkDocs.

mkdocstrings v1.0.6 8.4M downloads/30d#1,627 on PyPI2,082
Permissive license ISC Active released

What it is and what it does

This plugin for MkDocs extracts docstrings from source code and injects them into your documentation as formatted API reference sections. Instead of manually writing API docs, you add simple directives to your Markdown files, and the plugin parses the source, renders the docstrings, and handles cross-references automatically. It's language-agnostic through a handler system—the base package provides the framework, and separate handlers add support for different languages.

The plugin integrates with MkDocs and its theming system, with support for multiple themes. It supports cross-references both within your documentation and to external project inventories. Configuration is flexible—you can set defaults globally in mkdocs.yml and override them per-directive with YAML blocks.

Use it for:

  • Generate API reference docs automatically from docstrings in a project without manual documentation maintenance
  • Build multi-language API documentation for a library that exposes bindings in multiple languages
  • Create cross-referenced API docs where docstring links resolve automatically across multiple pages
  • Maintain up-to-date API documentation that stays in sync with source code changes
  • Reference external library APIs in your docs by loading their inventory files

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

An MkDocs plugin that automatically generates API documentation from source code docstrings, supporting multiple programming languages through pluggable handlers.

Yes. The plugin is actively maintained, has no known vulnerabilities, uses a permissive license, and integrates cleanly into MkDocs workflows with low install friction. It's production-ready and widely adopted. Install it if you use MkDocs and want to automate API documentation from source code; you'll also need to install a language handler for your target language.

Install

mkdocstrings on PyPI

pip

pip install mkdocstrings

uv

uv add mkdocstrings

poetry

poetry add mkdocstrings

Installing mkdocstrings

Before you install

Low friction install with a wheel distribution. Active maintenance with a recent release 34 days ago and 2082 repository stars. Requires Python 3.10 or later and depends on six runtime packages including mkdocs, Markdown, and Jinja2.

License in practice

ISC license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects without legal concern.

Quickstart

pip install mkdocstrings

# In mkdocs.yml:
plugins:
  - mkdocstrings

# In your markdown file:
::: my_module.MyClass

Requires Python 3.10 or later. Language handlers must be installed separately to generate docs for specific languages.

Verify before relying

  • Whether language handlers are bundled or must be installed separately for each language
  • Performance characteristics when documenting large codebases
  • Customization depth available for generated documentation styling beyond Material theme support

Package facts

License ISC (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — Jinja2, Markdown, MarkupSafe, mkdocs, mkdocs-autorefs, pymdown-extensions
Maintenance actively maintained — 34 days since the last release
Last repo commit
First released
Downloads 8,397,112/month — #1,627 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mkdocstrings-1.0.6-py3-none-any.whl

Keywords: mkdocs, mkdocs-plugin, docstrings, autodoc, documentation

Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DocumentationTopic :: Software DevelopmentTopic :: Software Development :: DocumentationTopic :: UtilitiesTyping :: Typed

Tags

automatic api documentation generationmkdocs plugin docstring extractionsource code documentation autodocmulti-language api docsdocstring to markdownmkdocs autodoc pluginapi reference generation
mkdocs-pluginautodocapi-reference

More Software Development packages

typing-extensions

Provides backported and experimental type hints…

permissive · top 100 on PyPI

numpy

NumPy provides an N-dimensional array object…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

distlib

Distlib provides low-level packaging utilities…

permissive · top 1,000 on PyPI

mkdocs-api-autonav

Automatically generates API reference…

permissive · top 15,000 on PyPI

mkdocs-click

Generates API documentation for Click…

permissive · top 5,000 on PyPI

mkdocstrings-python

Generates API documentation for Python projects…

permissive · top 5,000 on PyPI

mkdocstrings-python-legacy

A legacy Python documentation handler for…

permissive · top 15,000 on PyPI

mkdocs-static-i18n

A MkDocs plugin that adds static multi-language…

permissive · top 15,000 on PyPI

mkdocs-autorefs

A MkDocs plugin that automatically creates…

permissive · top 5,000 on PyPI

mkdocs-llmstxt

MkDocs plugin that generates an /llms.txt file…

permissive · top 15,000 on PyPI

mkdocs-task-collector

A MkDocs plugin that scans Markdown files for…

permissive · top 15,000 on PyPI

mdformat-mkdocs

An mdformat plugin that formats Markdown for…

permissive · top 15,000 on PyPI

mkdocs-techdocs-core

Bundles Spotify's TechDocs defaults—themes,…

permissive · top 15,000 on PyPI