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.0.1.tar.gz (14.9 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.0.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sphinx_pyrunblock-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7e303f82b7f0b0e0972bf9fcb0473532970a40e14c570d3c1a101a44be4854f8
MD5 97688039d1a6c322fe181c0c025cb75d
BLAKE2b-256 1f4c889c4a4f3d1d257c1b3f0b17e8bc3b5817d3bacc4c5e294c5e259abd1a7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_pyrunblock-1.0.1.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.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_pyrunblock-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e4dbfc7d37043c87277253cb6d388dfe391accd1eb0554ce254ef3b432795412
MD5 8c49ac9af2be420b0a1d1b9dcf357aae
BLAKE2b-256 fb13505078b6979d7891309f460cde46d23cd55eca97163c372d94a11ee1e45d

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_pyrunblock-1.0.1-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