Skip to main content


PyPI version Documentation Build Status

sphinx-pyrunblock

Fast, in-process embedding of live Python code output into your Sphinx docs. sphinx-pyrunblock runs each .. runblock:: example directly in a shared interpreter rather than spawning a subprocess per block — and it's backward compatible with sphinx-autorun: same runblock directive, same autorun_languages config shape, drop-in upgrade.

    .. runblock:: pycon

        >>> for i in range(5):
        ...    print(i)

Produces:

    >>> for i in range(5):
    ...    print(i)
    0
    1
    2
    3
    4

Installation

    $ pip install sphinx-pyrunblock

Enable the extension by adding it to the extensions list in conf.py:

    extensions.append("sphinx_pyrunblock")

See the full documentation for configuration (conf.py options, runfirst setup), per-block directive options (:numpy:, :scipy:, :smtb:, :precision:, :include:, :exclude:), and how errors are reported during a build.

Heritage

sphinx-pyrunblock began as a fork of sphinx-autorun by Hugo Osvaldo Barrera, itself descended from Vadim Gubergrits' original sphinxcontrib-autorun. See the full history for the complete lineage.

Download files

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

Source Distribution

sphinx_pyrunblock-1.1.0.tar.gz (135.7 kB view details)

Uploaded Source

Built Distribution

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

sphinx_pyrunblock-1.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_pyrunblock-1.1.0.tar.gz.

File metadata

  • Download URL: sphinx_pyrunblock-1.1.0.tar.gz
  • Upload date:
  • Size: 135.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sphinx_pyrunblock-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c03adb2bd87651feb00324c69be4e4fa29fdcf9b96237685aa81cad1de09702c
MD5 b60d96b28314f0805443b3248a1b6ce7
BLAKE2b-256 b054dfb4b223da5702345325a07efa7ae63800953e12fdf90dd5589ccdb15f0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_pyrunblock-1.1.0.tar.gz:

Publisher: release.yml on petercorke/sphinx-pyrunblock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_pyrunblock-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_pyrunblock-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e19db1cdd6ae30724842a096d27e14c337d36a99e8715feacd1092979e301013
MD5 8cdcc8ca20ed136dfc69c37c1c7a39af
BLAKE2b-256 54b1027244d75b8a8bfe751da035d566f94da4ad64a4c630a34b3a9ac9efa3f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_pyrunblock-1.1.0-py3-none-any.whl:

Publisher: release.yml on petercorke/sphinx-pyrunblock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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