sphinx-inlinecode

A Sphinx extension to embed source code blocks directly into documentation


Keywords
sphinx, viewcode, sphinx-extension, sphinx-contrib, code-block, inline-code, sphinx-ext, inline, embed, documentation, source-code, sphinx-doc
License
MIT
Install
pip install sphinx-inlinecode==2.0.0

Documentation

sphinx-inlinecode

sphinx-inlinecode PyPI Version sphinx-inlinecode GitHub Repository https://static.pepy.tech/personalized-badge/sphinx-inlinecode?period=total&units=none&left_color=grey&right_color=blue&left_text=Downloads sphinx-inlinecode Documentation Status

sphinx-inlinecode is a Sphinx extension that embeds source code blocks directly into your documentation as a dropdown.

Example

embedded code block added by sphinx-inlinecode

Unlike sphinx.ext.viewcode, source code blocks will also be added for property and cached_property entries

Installation

To install sphinx-inlinecode via pip:

pip install sphinx-inlinecode

Configuration

Add the extension to your conf.py

extensions = [
    "sphinx_inlinecode",
]

Documentation

Full documentation can be found on ReadTheDocs