Skip to main content

Run python code in sphinx

Project description

https://dev.azure.com/xavierdupre3/sphinx-runpython/_apis/build/status/sdpython.sphinx-runpython https://badge.fury.io/py/sphinx-runpython.svg GitHub Issues MIT License size https://img.shields.io/badge/code%20style-black-000000.svg https://codecov.io/github/sdpython/sphinx-runpython/branch/main/graph/badge.svg?token=CTUV6EDBB6

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 <url>`_

runpython

Executes code in the documentation and adds it to documentation.

.. runpython::
    :showcode:

    print("python code")
<<<

print("python code")

>>>

python code

List of directives

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-runpython-0.2.0.tar.gz (65.3 kB view hashes)

Uploaded Source

Built Distribution

sphinx_runpython-0.2.0-py3-none-any.whl (77.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page