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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file sphinx-runpython-0.2.0.tar.gz.

File metadata

  • Download URL: sphinx-runpython-0.2.0.tar.gz
  • Upload date:
  • Size: 65.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for sphinx-runpython-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0711b06235d613cc9f98315d3dd913cfb5b042e621bd27358adc05e2caa56195
MD5 a1d6cc75977ee8fb62d98e5b8f66a544
BLAKE2b-256 f86a01707dec897daa96e0816f76fea67875bed571a872d2178369f3441eb38b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinx_runpython-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b55ccf96e3596973216a0ad00bda615625215e614d8ea72444c6d53ea38c8d4e
MD5 1edd77db46d6507f06ca073fa85816c7
BLAKE2b-256 375736705e82e651a1e27ced56d6e022ffa2a84c043a855b897f87f3dbb999e3

See more details on using hashes here.

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