PyPI package License: MIT documentation build status

Automatic links from Python code examples to reference documentation at the flick of a switch! sphinx-codeautolink analyses the code in your documentation and inserts links to definitions that you use.

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

sphinx-codeautolink elsewhere:


$ pip install sphinx-codeautolink

To enable sphinx-codeautolink, modify the extension list in conf.py. Note that the extension name uses an underscore rather than a hyphen.

extensions = [

That’s it! Now your code examples are linked. For ways of concatenating multiple examples and setting default import statements among other things, have a look at the online documentation.


GitHub - felix-hilden/sphinx-codeautolink at pythonawesome.com
Automatic links from code examples to reference documentation - GitHub - felix-hilden/sphinx-codeautolink at pythonawesome.com