https://github.com/sdpython/sphinx-runpython
Extensions for sphinx, execute python, collapse buttons, ...
https://github.com/sdpython/sphinx-runpython
sphinx sphinx-extension
Last synced: 2 months ago
JSON representation
Extensions for sphinx, execute python, collapse buttons, ...
- Host: GitHub
- URL: https://github.com/sdpython/sphinx-runpython
- Owner: sdpython
- License: mit
- Created: 2023-05-31T11:24:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-03T11:35:07.000Z (about 1 year ago)
- Last Synced: 2024-12-28T19:33:13.616Z (11 months ago)
- Topics: sphinx, sphinx-extension
- Language: Python
- Homepage: https://sdpython.github.io/doc/sphinx-runpython/dev/
- Size: 1.62 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOGS.rst
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
.. image:: https://github.com/sdpython/sphinx-runpython/raw/main/_doc/_static/logo.png
:width: 120
sphinx-runpython: run python code in sphinx
===========================================
.. image:: https://dev.azure.com/xavierdupre3/sphinx-runpython/_apis/build/status/sdpython.sphinx-runpython
:target: https://dev.azure.com/xavierdupre3/sphinx-runpython/
.. image:: https://badge.fury.io/py/sphinx-runpython.svg
:target: http://badge.fury.io/py/sphinx-runpython
.. image:: http://img.shields.io/github/issues/sdpython/sphinx-runpython.png
:alt: GitHub Issues
:target: https://github.com/sdpython/sphinx-runpython/issues
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:alt: MIT License
:target: https://opensource.org/license/MIT/
.. image:: https://img.shields.io/github/repo-size/sdpython/sphinx-runpython
:target: https://github.com/sdpython/sphinx-runpython/
:alt: size
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://codecov.io/github/sdpython/sphinx-runpython/branch/main/graph/badge.svg?token=CTUV6EDBB6
:target: https://codecov.io/github/sdpython/sphinx-runpython
**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
`_.
epkg
++++
It implements a list of recurring urls in documentation.
**conf.py**
::
epkg_dictionary = {'title': 'url' }
**rst**
::
:epkg:`title` -> `title `_
runpython
+++++++++
Executes code in the documentation and adds it to documentation.
::
.. runpython::
:showcode:
print("python code")
::
<<<
print("python code")
>>>
python code
List of directives
++++++++++++++++++
* `blocref `_
* `collapse `_
* `docassert `_
* `epkg `_
* `exref `_
* `faqref `_
* `gdot `_
* `mathdef `_
* `runpython `_
* `sphinx_rst_builder `_