mkdocstrings
Automatic documentation from sources, for MkDocs. Come have a chat or ask questions on our Gitter channel.
Features - Installation - Quick usage
Features
-
Language-agnostic: just like MkDocs, mkdocstrings is written in Python but is language-agnostic. It means you can use it with any programming language, as long as there is a handler for it. We currently have handlers for the C, Crystal, GitHub Actions, Python, MATLAB, TypeScript, and VBA languages, as well as for shell scripts/libraries. Maybe you'd like to add another one to the list? 😉
-
Multiple themes support: each handler can offer multiple themes. Currently, we offer the ⭐ Material theme ⭐ as well as basic support for the ReadTheDocs and MkDocs themes for the Python handler.
-
Cross-references across pages: mkdocstrings makes it possible to reference headings in other Markdown files with the classic Markdown linking syntax:
[identifier][]or[title][identifier]-- and you don't need to remember which exact page this object was on. This works for any heading that's produced by a mkdocstrings language handler, and you can opt to include any Markdown heading into the global referencing scheme.Note: in versions prior to 0.15 all Markdown headers were included, but now you need to opt in.
-
Cross-references across sites: similarly to Sphinx's intersphinx extension, mkdocstrings can reference API items from other libraries, given they provide an inventory and you load that inventory in your MkDocs configuration.
-
Inline injection in Markdown: instead of generating Markdown files, mkdocstrings allows you to inject documentation anywhere in your Markdown contents. The syntax is simple:
::: identifierfollowed by a 4-spaces indented YAML block. The identifier and YAML configuration will be passed to the appropriate handler to collect and render documentation. -
Global and local configuration: each handler can be configured globally in
mkdocs.yml, and locally for each "autodoc" instruction. -
Reasonable defaults: you should be able to just drop the plugin in your configuration and enjoy your auto-generated docs.
Used by
mkdocstrings is used by well-known companies, projects and scientific teams: Ansible, Apache, FastAPI, Google, IBM, Jitsi, Microsoft, NVIDIA, Prefect, Pydantic, Textual, and more...
Installation
The mkdocstrings package doesn't provide support for any language: it's just a common base for language handlers.
It means you likely want to install it with one or more official handlers, using extras.
For example, to install it with Python support:
pip install 'mkdocstrings[python]'
Alternatively, you can directly install the language handlers themselves,
which depend on mkdocstrings anyway:
pip install mkdocstrings-python
This will give you more control over the accepted range of versions for the handlers themselves.
See the official language handlers.
With conda:
conda install -c conda-forge mkdocstrings mkdocstrings-python
Quick usage
In mkdocs.yml:
site_name: "My Library"
theme:
name: "material"
plugins:
- search
- mkdocstrings
In one of your markdown files:
# Reference
::: my_library.my_module.my_class
See the Usage section of the docs for more examples!
Sponsors
And 4 more private sponsor(s).
Metadata
Release files for mkdocstrings 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocstrings-1.0.8.tar.gz | 107.4 kB | Without provenance | Details for mkdocstrings-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocstrings-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for mkdocstrings-1.0.8-py3-none-any.whl |
Total release size: 149.7 kB
Release files / mkdocstrings-1.0.8.tar.gz
| Download URL | mkdocstrings-1.0.8.tar.gz |
|---|---|
| Size | 107.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b50fc326230906425c82ee9ec59b80e5db00892b2b593d4d0b841a0d4acf537b
|
|
BLAKE2b-256 checksum How to use checksums |
27cce3ed8b16851f5d664dffcf8f55fc60d0d3f736a3edca21d1508105d1255a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Release files / mkdocstrings-1.0.8-py3-none-any.whl
| Download URL | mkdocstrings-1.0.8-py3-none-any.whl |
|---|---|
| Size | 42.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b03ed2b863009f1153f0d04aacb22a85b92afc28a0636d85717c92eecca638c
|
|
BLAKE2b-256 checksum How to use checksums |
195e4df7a2290e97c60a3ba410084966e5ab84aa89d15c8c98c195acbaefa8f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Security for mkdocstrings 1.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.