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.

Metadata

Release files for sphinx-pyrunblock 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-pyrunblock 1.2.0
File Size Uploaded
sphinx_pyrunblock-1.2.0.tar.gz 142.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-pyrunblock 1.2.0
File Interpreter ABI Platform
sphinx_pyrunblock-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 154.6 kB

Release files / sphinx_pyrunblock-1.2.0.tar.gz

Download URL sphinx_pyrunblock-1.2.0.tar.gz
Size 142.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4f93f6a874640c7862a869b6c634031ba51d28ff7e4395a6705461870b62ad0e
BLAKE2b-256 checksum
How to use checksums
619d0d01aea18b078cd11b915f48815b55ebefdf807ac3f453e7042ee685be24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / sphinx_pyrunblock-1.2.0-py3-none-any.whl

Download URL sphinx_pyrunblock-1.2.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65dc16af480799f2a9ef9fdfbb5e9a2144098d42bccdadbd832c767335335b91
BLAKE2b-256 checksum
How to use checksums
e94ea23ec28a05bdaada960493d404e8219e1864761030e4455b4281dca99e44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page