sphinx-runpython implements sphinx extensions including one to execute code and add the output to the documentation. The library is released on pypi/sphinx-runpython and its documentation is published at sphinx-runpython.
It implements a list of recurring urls in documentation.
conf.py
epkg_dictionary = {'title': 'url' }
rst
:epkg:`title` -> `title <url>`_
Executes code in the documentation and adds it to documentation.
.. runpython:: :showcode: print("python code")
<<< print("python code") >>> python code