Extension and demo to integrate JupyterLite with Capytale.
This repository contains a JupyterLab extension to integrate JupyterLite with Capytale, and a demo to show how to use it.
The extension is located in the src
folder. It sets up a bridge between a host application and a JupyterLite instance by using postMessage
to communicate between the two.
To install and develop the extension, see the Development
and Usage
sections below.
The demo is located in the demo
folder:
index.html
: the main entry point of the democontent
: a few example notebooksoverrides.json
: default set of override JupyterLab settings to customize the UI, to use a default display language, hide buttons and menu entries, etc...requirements.txt
: list of Python packages to install before building the JupyterLite site
This demo is also deployed on GitHub pages and available at https://quantstack.net/jupyterlite-capytale.
# Clone the repo to your local environment
# Create a new environment
mamba create -n jupyterlite-capytale -c conda-forge python=3.11 jupyterlite-pyodide-kernel=0.2 jupyterlab=4 notebook=7
# Activate the environment
mamba activate jupyterlite-capytale
# Install package in development mode
python -m pip install -e .
# Link your development version of the extension
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm build
Build a new JupyterLite site:
# build the demo
jlpm demo:build
# serve the demo
jlpm demo:build
Then go to http://localhost:8000 to open the demo.