sphinx-codeautolink 0.17.5


pip install sphinx-codeautolink

  Latest version

Released: Jul 09, 2025


Meta
Author: Felix Hildén
Maintainer: Felix Hildén
Requires Python: >=3.10

Classifiers

Development Status
  • 4 - Beta

Framework
  • Sphinx
  • Sphinx :: Extension

Programming Language
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Documentation
  • Documentation :: Sphinx
  • Software Development :: Documentation

Python versions Monthly downloads License: MIT Documentation

sphinx-codeautolink makes code examples clickable by inserting links from individual code elements to the corresponding reference documentation. We aim for a minimal setup assuming your examples are already valid Python.

For a live demo, see our online documentation on Read The Docs.

Installation

sphinx-codeautolink can be installed from the following sources:

$ pip install sphinx-codeautolink
$ conda install -c conda-forge sphinx-codeautolink

Note that the library is in early development, so version pinning is advised. To enable sphinx-codeautolink, modify the extension list in conf.py. Note that the extension name uses an underscore rather than a hyphen.

extensions = [
    ...,
    "sphinx_codeautolink",
]

That’s it! Now your code examples are linked. For ways of concatenating examples, setting default import statements, or customising link style among other things, see the online documentation.

Extras:
Dependencies:
sphinx (>=3.2.0)
beautifulsoup4 (>=4.8.1)