Execution Libraries#

Many execution libraries can be used to display the output of IPyhton cells. We usedMySTnb to parse and display the outputs presented inPyData Library Styles. In this section we’ll show alternatives that runs code for you using a Jupyter like kernel.

Jupyterlite#

Warning

The jupyterLite lib is not yet providing a handle to switch from light to dark theme. If you consider using it in your documentation you should also enforce the light theme to your users.Followjupyterlite/jupyterlite-sphinx#69 for more information.

jupyterlite-sphinx brings the power ofJupyterLite to your Sphinx documentation. It makes a full JupyterLite deployment in your docs and provide some utilities for using that deployment easily.

This section demonstrate how it displays in apydata-sphinx-theme context:

Try Replite!

jupyter-sphinx#

Another common library isjupyter-sphinx.This section demonstrates a subset of functionality to make sure it behaves as expected.

importmatplotlib.pyplotaspltimportnumpyasnprng=np.random.default_rng()data=rng.standard_normal((3,100))fig,ax=plt.subplots()ax.scatter(data[0],data[1],c=data[2],s=3)
<matplotlib.collections.PathCollection at 0x7fe38a9cac80>
../_images/execution_0_1.png