8000 GitHub - mkdocstrings/python at b787e78e31652438039775850e55ea956c22e8d0
[go: up one dir, main page]

Skip to content

mkdocstrings/python

Repository files navigation

Python for mkdocstrings

ci documentation pypi version gitpod gitter

A Python handler for mkdocstrings.

Requirements

Python for mkdocstrings requires Python 3.7 or above.

To install Python 3.7, I recommend using pyenv.
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv

# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"

# install Python 3.7
pyenv install 3.7.12

# make it available globally
pyenv global system 3.7.12

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 explicitely depend on the handler:

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