QuantStack / jupyterlite-capytale

JupyterLite deployment for integration with Capytale
https://quantstack.net/jupyterlite-capytale/
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

JupyterLite Capytale

lite-badge

Extension and demo to integrate JupyterLite with Capytale.

Structure

This repository contains a JupyterLab extension to integrate JupyterLite with Capytale, and a demo to show how to use it.

Extension

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.

Demo

The demo is located in the demo folder:

This demo is also deployed on GitHub pages and available at https://quantstack.net/jupyterlite-capytale.

Development

# 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

Usage

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.