sphinx-inlinecode
is a Sphinx extension that embeds source code blocks directly into your documentation as a dropdown.
Example
Unlike sphinx.ext.viewcode
, source code blocks will also be added for property
and cached_property
entries
To install sphinx-inlinecode
via pip:
pip install sphinx-inlinecode
Add the extension to your conf.py
extensions = [
"sphinx_inlinecode",
]
Full documentation can be found on ReadTheDocs