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.6.tar.gz (99.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mkdocstrings_python_legacy-0.2.6.tar.gz
Algorithm Hash digest
SHA256 261d7dd920c46db7d83f7230789cb836ee148e213f43aecc827e3f7ca6a5c4d9
MD5 4b1f2c247feadace2faae8af06565d02
BLAKE2b-256 0bd1bc83e8222452ee34189cfeddb22ee6146830f6696afecf1cf192ccaefa1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocstrings_python_legacy-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7c232175db610e20baf38bcd9b0cd51aa03c290b3e7c5eec1a797ac3121271c4
MD5 54752db7b7698aa1d8e7231e635b7907
BLAKE2b-256 f104bbefcd0049334a619746a4cd5bd8fd24d9f1723c92ad2261024758fa7290

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