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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_runpython-0.4.3-py3-none-any.whl (88.7 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_runpython-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_runpython-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6761d5ab1344b795b4c37c4d0113a5b96c21b5c577279480cb64422731479548
MD5 6f71527e7894fa5ab8ebbe0b436c6bf5
BLAKE2b-256 0298ecf22a973d5ae59026d46963b30ee299e2f72b19478d674501c4a4a9d725

See more details on using hashes here.

Supported by

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