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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_pyrunblock-1.0.0.tar.gz
  • Upload date:
  • Size: 18.3 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.0.tar.gz
Algorithm Hash digest
SHA256 57c1df3f85a1f7bae998c57df2fe3a116ac6e820d1f57e0671bd4765514ed5c0
MD5 577109dff4146d0e1769c7ac9dcea2ab
BLAKE2b-256 78220669d8d3d4f9961521ff391227f37b093fa90eb8d46c369ea11909bb7a3b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for sphinx_pyrunblock-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1922cc33433d2efc8359e1f0bf6df1e9d6a23077973db98aafc833748612d78f
MD5 1f5b49c8bb890a6bf289ce34fe55ff9b
BLAKE2b-256 eb8e72d2d602d112a173ace6bec482446ad6f4db8288ce2e5773ed11471a7921

See more details on using hashes here.

Provenance

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