sphinx-thebe

sphinx-thebe#

Documentation PyPi page

Make your code cells interactive with a kernel provided by Thebe and Binder.

It uses the excellent thebe project, and pre-configures thebe to be compatible with common Jupyter-related patterns in the Sphinx ecosystem, such as MyST-NB.

For example, click the button below. Notice that the code block beneath becomes editable and runnable!

print("hi")

See Use sphinx-thebe for more information about what you can do with sphinx-thebe.

Install#

To install sphinx-thebe first clone and install it:

pip install sphinx-thebe

Then, add it to your Sphinx site’s conf.py file:

extensions = [
    ...
    "sphinx_thebe"
    ...
]

Configure and use#

For more information about how to configure sphinx-thebe, see Configuration.

For more information on using sphinx-thebe, see Use sphinx-thebe.