sphinx-thebe
Integrate interactive code blocks into your documentation with Thebe and Binder.
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-thebeuv
uv add sphinx-thebepoetry
poetry add sphinx-thebeInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
jupyter-sphinxJupyter Sphinx Extensions runs code embedded in…
unclear · top 15,000 on PyPI
sphinx-copybuttonA Sphinx extension that adds a copy button to…
permissive · top 5,000 on PyPI
sphinx-togglepromptAdds a button to Python code blocks in Sphinx…
permissive · top 15,000 on PyPI
sphinx-codeautolinksphinx-codeautolink automatically converts code…
unclear · top 15,000 on PyPI
sphinx-substitution-extensionsAdds substitution support to Sphinx directives,…
permissive · top 15,000 on PyPI
readthedocs-sphinx-searchA Sphinx extension that adds real-time…
permissive · top 15,000 on PyPI
sphinx-gallerySphinx-Gallery is a Sphinx extension that…
permissive · top 15,000 on PyPI
sphinx-book-themeA Sphinx theme that renders documentation as an…
permissive · top 5,000 on PyPI
sphinxcontrib-googleanalyticsAdds Google Analytics tracking to…
permissive · top 15,000 on PyPI
sphinx-inline-tabsAdds tabbed content blocks to Sphinx…
permissive · top 15,000 on PyPI