mkdocstrings-python 2.0.3


pip install mkdocstrings-python

  Latest version

Released: Feb 20, 2026


Meta
Author: Timothée Mazzucotelli
Requires Python: >=3.10

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers

Programming Language
  • Python
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Topic
  • Documentation
  • Software Development
  • Software Development :: Documentation
  • Utilities

Typing
  • Typed

mkdocstrings-python

A Python handler for mkdocstrings.

ci documentation pypi version gitter


The Python handler uses Griffe to collect documentation from Python source code. The word "griffe" can sometimes be used instead of "signature" in French. Griffe is able to visit the Abstract Syntax Tree (AST) of the source code to extract useful information. It is also able to execute the code (by importing it) and introspect objects in memory when source code is not available. Finally, it can parse docstrings following different styles.

Installation

You can install this handler as a mkdocstrings extra:

# PEP 621 dependencies declaration
# adapt to your dependencies manager
[project]
dependencies = [
    "mkdocstrings[python]>=0.18",
]

You can also explicitly depend on the handler:

# PEP 621 dependencies declaration
# adapt to your dependencies manager
[project]
dependencies = [
    "mkdocstrings-python",
]

Preview

mkdocstrings_python_gif

Features

  • Data collection from source code: collection of the object-tree and the docstrings is done thanks to Griffe.

  • Support for type annotations: Griffe collects your type annotations and mkdocstrings uses them to display parameter types or return types. It is even able to automatically add cross-references to other objects from your API, from the standard library or third-party libraries! See how to load inventories to enable it.

  • Recursive documentation of Python objects: just use the module dotted-path as an identifier, and you get the full module docs. You don't need to inject documentation for each class, function, etc.

  • Support for documented attributes: attributes (variables) followed by a docstring (triple-quoted string) will be recognized by Griffe in modules, classes and even in __init__ methods.

  • Multiple docstring-styles support: common support for Google-style, Numpydoc-style, and Sphinx-style docstrings. See Griffe's documentation on docstrings support.

  • Admonition support in Google docstrings: blocks like Note: or Warning: will be transformed to their admonition equivalent. We do not support nested admonitions in docstrings!

  • Every object has a TOC entry: we render a heading for each object, meaning MkDocs picks them into the Table of Contents, which is nicely displayed by the Material theme. Thanks to mkdocstrings cross-reference ability, you can reference other objects within your docstrings, with the classic Markdown syntax: [this object][package.module.object] or directly with [package.module.object][]

  • Source code display: mkdocstrings can add a collapsible div containing the highlighted source code of the Python object.

Sponsors

Silver sponsors

FastAPI

Bronze sponsors

Nixtla


ofek samuelcolvin tlambert03 ssbarnea femtomc cmarqu kolenaIO ramnes machow BenHammersley trevorWieland MarcoGorelli analog-cbarber OdinManiac rstudio-sponsorship schlich butterlyn livingbio NemetschekAllplan EricJayHartman 15r10nk activeloopai roboflow cmclaughlin blaisep RapidataAI rodolphebarbanneau theSymbolSyndicate blakeNaccarato ChargeStorm Alphadelta14 Cusp-AI

And 7 more private sponsor(s).

2.0.3 Feb 20, 2026
2.0.2 Feb 09, 2026
2.0.1 Dec 03, 2025
2.0.0 Nov 27, 2025
1.19.0 Nov 10, 2025
1.18.2 Aug 28, 2025
1.18.1 Aug 28, 2025
1.18.0 Aug 26, 2025
1.17.0 Aug 14, 2025
1.16.12 Jun 03, 2025
1.16.11 May 24, 2025
1.16.10 Apr 03, 2025
1.16.9 Apr 03, 2025
1.16.8 Mar 24, 2025
1.16.7 Mar 20, 2025
1.16.6 Mar 18, 2025
1.16.5 Mar 10, 2025
1.16.4 Mar 10, 2025
1.16.3 Mar 08, 2025
1.16.2 Feb 24, 2025
1.16.1 Feb 18, 2025
1.16.0 Feb 17, 2025
1.15.1 Feb 17, 2025
1.15.0 Feb 11, 2025
1.14.7 Feb 11, 2025
1.14.6 Feb 07, 2025
1.14.5 Feb 05, 2025
1.14.4 Feb 04, 2025
1.14.3 Feb 04, 2025
1.14.2 Feb 03, 2025
1.14.1 Feb 03, 2025
1.14.0 Feb 03, 2025
1.13.0 Dec 26, 2024
1.12.2 Oct 19, 2024
1.12.1 Oct 14, 2024
1.12.0 Oct 12, 2024
1.11.1 Sep 03, 2024
1.11.0 Sep 03, 2024
1.10.9 Aug 30, 2024
1.10.8 Aug 14, 2024
1.10.7 Jul 25, 2024
1.10.6 Jul 25, 2024
1.10.5 Jun 19, 2024
1.10.4 Jun 18, 2024
1.10.3 May 22, 2024
1.10.2 May 15, 2024
1.10.1 May 14, 2024
1.10.0 Apr 19, 2024
1.9.2 Apr 02, 2024
1.9.1 Apr 02, 2024
1.9.0 Mar 13, 2024
1.8.0 Jan 08, 2024
1.7.5 Nov 21, 2023
1.7.4 Nov 12, 2023
1.7.3 Oct 09, 2023
1.7.2 Oct 05, 2023
1.7.1 Sep 28, 2023
1.7.0 Sep 14, 2023
1.6.3 Sep 11, 2023
1.6.2 Sep 05, 2023
1.6.1 Sep 04, 2023
1.6.0 Aug 27, 2023
1.5.2 Aug 25, 2023
1.5.1 Aug 24, 2023
1.5.0 Aug 20, 2023
1.4.0 Aug 18, 2023
1.3.0 Aug 06, 2023
1.2.1 Jul 20, 2023
1.2.0 Jul 14, 2023
1.1.2 Jun 04, 2023
1.1.1 Jun 04, 2023
1.1.0 May 26, 2023
1.0.0 May 11, 2023
0.10.1 May 07, 2023
0.10.0 May 06, 2023
0.9.0 Apr 03, 2023
0.8.3 Jan 04, 2023
0.8.2 Nov 19, 2022
0.8.1 Nov 19, 2022
0.8.0 Nov 13, 2022
0.7.1 Jun 12, 2022
0.7.0 May 28, 2022
0.6.6 Mar 05, 2022
0.6.5 Feb 24, 2022
0.6.4 Feb 22, 2022
0.6.3 Feb 20, 2022
0.6.2 Feb 17, 2022
0.6.1 Feb 17, 2022
0.6.0 Feb 13, 2022
0.5.4 Feb 13, 2022
0.5.3 Feb 08, 2022
0.5.2 Feb 05, 2022
0.5.1 Feb 03, 2022
0.5.0 Feb 03, 2022
0.4.1 Feb 01, 2022
0.4.0 Feb 01, 2022
0.3.0 Jan 14, 2022
0.2.0 Dec 28, 2021
0.1.0 Dec 18, 2021
Extras: None
Dependencies:
mkdocstrings (>=0.30)
mkdocs-autorefs (>=1.4)
griffelib (>=2.0)
typing-extensions (>=4.0)