Skip to main content

A legacy Python handler for mkdocstrings.

Project description

mkdocstrings-python-legacy

The legacy Python handler for mkdocstrings.

ci documentation pypi version gitpod gitter


WARNING: We suggest using the new handler instead: mkdocstrings-python.

Installation

You can install this handler as a mkdocstrings extra:

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

You can also explicitely depend on the handler:

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

Preview

mkdocstrings_python_gif

Features

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

  • Support for type annotations: pytkdocs collects your type annotations and mkdocstrings uses them to display parameters types or return types.

  • Recursive documentation of Python objects: just use the module dotted-path as 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.

  • 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 display 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocstrings_python_legacy-0.2.7.tar.gz (99.6 kB view details)

Uploaded Source

Built Distribution

mkdocstrings_python_legacy-0.2.7-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file mkdocstrings_python_legacy-0.2.7.tar.gz.

File metadata

File hashes

Hashes for mkdocstrings_python_legacy-0.2.7.tar.gz
Algorithm Hash digest
SHA256 1aa8a277a332fb0d49be3786de3fa18af7d8792e8d611f6ba8d550dc3a1ff8a1
MD5 6912fdccc99b0aa81af5c7c7bc8f9bf1
BLAKE2b-256 394b3b1724ae9d82646c81f9dda3a7e3a0101f433e0b9e4344157b6e3a4e48b2

See more details on using hashes here.

File details

Details for the file mkdocstrings_python_legacy-0.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocstrings_python_legacy-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c24a0a5867749fd826dfa190e10afcbd4c415cbcb2f805fc4791472b4bf221e9
MD5 652b24c2ffcf380e2f30e66e3ef52bae
BLAKE2b-256 e225b353bc04f24502ea0afe129b3045b73f3297e828e4baaf33c286417a9657

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page