+</code></pre></div> <h2 id=preview>Preview<a class=headerlink href=#preview title="Permanent link">¤</a></h2> <!-- TODO: update the GIF with a more recent screen capture. Maybe use mp4 instead --> <p><img alt=mkdocstrings_python_gif src=https://user-images.githubusercontent.com/3999221/77157838-7184db80-6aa2-11ea-9f9a-fe77405202de.gif></p> <h2 id=features>Features<a class=headerlink href=#features title="Permanent link">¤</a></h2> <ul> <li> <p><strong>Data collection from source code</strong>: collection of the object-tree and the docstrings is done thanks to <a href=https://github.com/mkdocstrings/griffe>Griffe</a>.</p> </li> <li> <p><strong>Support for type annotations:</strong> Griffe collects your type annotations and <em>mkdocstrings</em> 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 <a href=https://mkdocstrings.github.io/usage/#cross-references-to-other-projects-inventories>how to load inventories</a> to enable it.</p> </li> <li> <p><strong>Recursive documentation of Python objects:</strong> 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.</p> </li> <li> <p><strong>Support for documented attributes:</strong> attributes (variables) followed by a docstring (triple-quoted string) will be recognized by Griffe in modules, classes and even in <code>__init__</code> methods.</p> </li> <li> <p><strong>Multiple docstring-styles support:</strong> common support for Google-style, Numpydoc-style, and Sphinx-style docstrings. See <a href=https://mkdocstrings.github.io/griffe/docstrings/ >Griffe's documentation</a> on docstrings support.</p> </li> <li> <p><strong>Admonition support in Google docstrings:</strong> blocks like <code>Note:</code> or <code>Warning:</code> will be transformed to their <a href=https://squidfunk.github.io/mkdocs-material/reference/admonitions/ >admonition</a> equivalent. <em>We do not support nested admonitions in docstrings!</em></p> </li> <li> <p><strong>Every object has a TOC entry:</strong> we render a heading for each object, meaning <em>MkDocs</em> picks them into the Table of Contents, which is nicely displayed by the Material theme. Thanks to <em>mkdocstrings</em> cross-reference ability, you can reference other objects within your docstrings, with the classic Markdown syntax: <code>[this object][package.module.object]</code> or directly with <code>[package.module.object][]</code></p> </li> <li> <p><strong>Source code display:</strong> <em>mkdocstrings</em> can add a collapsible div containing the highlighted source code of the Python object.</p> </li> </ul> <aside class=md-source-file> <span class=md-source-file__fact> <span class=md-icon title="Last update"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg> </span> <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-timeago" title="July 25, 2024 16:15:43"><span class=timeago datetime=2024-07-25T16:15:43+00:00 locale=en></span></span><span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-iso_date" title="July 25, 2024 16:15:43">2024-07-25</span> </span> <span class=md-source-file__fact> <span class=md-icon title=Created> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M14.47 15.08 11 13V7h1.5v5.25l3.08 1.83c-.41.28-.79.62-1.11 1m-1.39 4.84c-.36.05-.71.08-1.08.08-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8c0 .37-.03.72-.08 1.08.69.1 1.33.32 1.92.64.1-.56.16-1.13.16-1.72 0-5.5-4.5-10-10-10S2 6.5 2 12s4.47 10 10 10c.59 0 1.16-.06 1.72-.16-.32-.59-.54-1.23-.64-1.92M18 15v3h-3v2h3v3h2v-3h3v-2h-3v-3z"/></svg> </span> <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-timeago" title="October 30, 2021 12:42:21"><span class=timeago datetime=2021-10-30T12:42:21+00:00 locale=en></span></span><span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-iso_date" title="October 30, 2021 12:42:21">2021-10-30</span> </span> </aside> <!-- Giscus --> <!-- https://squidfunk.github.io/mkdocs-material/setup/adding-a-comment-system/#giscus-integration --> <div id=feedback style="display: none;"> <h2 id=__comments>Feedback</h2> <script src=https://giscus.app/client.js data-repo=mkdocstrings/python data-repo-id=R_kgDOGTScxA data-category=Documentation data-category-id=DIC_kwDOGTScxM4ChLJD data-mapping=pathname data-strict=1 data-reactions-enabled=0 data-emit-metadata=0 data-input-position=top data-theme=preferred_color_scheme data-lang=en data-loading=lazy crossorigin=anonymous async>
0 commit comments