docs | |
---|---|
tests | |
package |
sphinx-code-include is an extension for Sphinx that lets you render source-code of any class or function directly into your Sphinx documentation using only as string.
- Free software: BSD 2-Clause License
Example
.. code-include :: :func:`os.path.join`
This code-include block renders as: (theme is sphinx_rtd_theme)
As long as the string you've chosen is either
- is importable
- is coming from a project that has sphinx.ext.viewcode enabled
then code-include can find it and render it in your documentation.
pip install sphinx-code-include
You can also install the in-development version with:
pip install https://github.com/ColinKennedy/sphinx-code-include/archive/master.zip
https://sphinx-code-include.readthedocs.io/
To run the all tests run:
tox