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.

Release files for sphinx-pyrunblock 1.1.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.1.0
File Size Uploaded
sphinx_pyrunblock-1.1.0.tar.gz 135.7 kB Details

Built distribution (wheel)

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

Total release size: 146.2 kB

Release files / sphinx_pyrunblock-1.1.0.tar.gz

Download URL sphinx_pyrunblock-1.1.0.tar.gz
Size 135.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c03adb2bd87651feb00324c69be4e4fa29fdcf9b96237685aa81cad1de09702c
BLAKE2b-256 checksum
How to use checksums
b054dfb4b223da5702345325a07efa7ae63800953e12fdf90dd5589ccdb15f0f
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 Jul 30, 2026.

Transparency log

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

Download URL sphinx_pyrunblock-1.1.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e19db1cdd6ae30724842a096d27e14c337d36a99e8715feacd1092979e301013
BLAKE2b-256 checksum
How to use checksums
54b1027244d75b8a8bfe751da035d566f94da4ad64a4c630a34b3a9ac9efa3f2
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 Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

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