skillfed

sphinx-thebe

Integrate interactive code blocks into your documentation with Thebe and Binder.

sphinx-thebe v0.3.1 193.5K downloads/30d#9,850 on PyPI30
License unclear DORMANT released

What it is and what it does

sphinx-thebe is a Sphinx extension that embeds interactive code execution into your documentation. It uses Thebe (a JavaScript library) and Binder (a cloud-hosted Jupyter service) to let readers run, modify, and experiment with code examples directly in their browser without leaving the documentation page. The extension handles the plumbing of connecting your code blocks to a live kernel.

You install it as a Python package, add it to your Sphinx configuration, and then annotate code blocks in your documentation to make them interactive. The extension depends only on Sphinx itself, making it straightforward to add to existing documentation builds. However, the project is dormant—no active maintenance since early 2024—so it may not keep pace with newer Sphinx versions or Thebe API changes.

Use it for:

  • Add runnable examples to technical documentation so readers can experiment with code without setting up a local environment.
  • Create interactive tutorials where learners modify and execute code snippets directly in the browser.
  • Demonstrate data science workflows in Jupyter-backed documentation, letting readers tweak parameters and see results live.
  • Build educational materials where code blocks are executable, encouraging hands-on learning.
  • Showcase library APIs with live examples that readers can test and adapt in real time.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds interactive, executable code blocks to Sphinx documentation by integrating Thebe and Binder, allowing readers to run and modify code examples directly in the browser.

Yes, if your documentation is Sphinx-based and you want to add interactivity without heavy infrastructure. The low install friction and zero security vulnerabilities are positives. However, the dormant maintenance status (last release Feb 2024, no recent commits) means you should verify compatibility with your Sphinx version and be prepared to fork or patch if issues arise. Confirm the license status before committing to production use.

Install

sphinx-thebe on PyPI

pip

pip install sphinx-thebe

uv

uv add sphinx-thebe

poetry

poetry add sphinx-thebe

Installing sphinx-thebe

Before you install

Low friction install with a single runtime dependency on Sphinx. Maintenance is dormant—last release was 2024-02-07 and no commits since 2024-09-03—so expect no active bug fixes or feature updates, though the repository remains open and unarchived.

License in practice

License status is unclear; the package metadata contains no SPDX identifier or raw license text. Verify the actual license before use in proprietary or restricted contexts.

Quickstart

pip install sphinx-thebe

Then add to your Sphinx conf.py:
extensions = [
    "sphinx_thebe"
]

Requires Sphinx to be installed and configured; Thebe and Binder infrastructure must be available and properly configured in your documentation setup.

Verify before relying

  • What license does sphinx-thebe actually use? The metadata is blank.
  • Does Thebe/Binder integration require additional configuration beyond adding the extension?
  • What are the runtime dependencies of Thebe itself, and do they introduce additional friction?

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — sphinx
Maintenance dormant — 919 days since the last release
Last repo commit
First released
Downloads 193,516/month — #9,850 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sphinx_thebe-0.3.1-py3-none-any.whl

Keywords: development, docutils, sphinx

Development Status :: 4 - BetaFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Tags

interactive code blocks sphinxexecutable documentationthebe sphinx integrationbinder jupyter documentationlive code examples docsrunnable code snippets sphinxbrowser-based code execution
interactive-docsjupyter-integrationsphinx-extension

More Python Modules packages

idna

Converts domain names between Unicode and…

permissive · top 100 on PyPI

setuptools

Setuptools is a Python build backend and…

permissive · top 100 on PyPI

PyYAML

PyYAML parses and emits YAML 1.1 data format,…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

annotated-types

Provides reusable metadata objects for use with…

permissive · top 100 on PyPI

typing-inspection

Provides runtime tools to inspect and…

permissive · top 100 on PyPI

jupyter-sphinx

Jupyter Sphinx Extensions runs code embedded in…

unclear · top 15,000 on PyPI

sphinx-copybutton

A Sphinx extension that adds a copy button to…

permissive · top 5,000 on PyPI

sphinx-toggleprompt

Adds a button to Python code blocks in Sphinx…

permissive · top 15,000 on PyPI

sphinx-codeautolink

sphinx-codeautolink automatically converts code…

unclear · top 15,000 on PyPI

sphinx-substitution-extensions

Adds substitution support to Sphinx directives,…

permissive · top 15,000 on PyPI

readthedocs-sphinx-search

A Sphinx extension that adds real-time…

permissive · top 15,000 on PyPI

sphinx-gallery

Sphinx-Gallery is a Sphinx extension that…

permissive · top 15,000 on PyPI

sphinx-book-theme

A Sphinx theme that renders documentation as an…

permissive · top 5,000 on PyPI

sphinxcontrib-googleanalytics

Adds Google Analytics tracking to…

permissive · top 15,000 on PyPI

sphinx-inline-tabs

Adds tabbed content blocks to Sphinx…

permissive · top 15,000 on PyPI