Skip to content

jupyterlite/p5-kernel

jupyterlite-p5-kernel

Github Actions Status JupyterLite

A p5.js kernel for JupyterLite.

image

Requirements

Install

This JupyterLite kernel can be installed as a federated server extension.

# Install the kernel
pip install jupyterlite-p5-kernel

# Build a new JupyterLite site
jupyter lite build

See the JupyterLite documentation for more information on how to build sites and include additional extensions: https://jupyterlite.readthedocs.io/en/latest/howto/index.html

Uninstall

pip uninstall jupyterlite-p5-kernel

Contributing

Development install

# Clone the repo to your local environment
# Change directory to the fork directory

# create a new enviroment
mamba create --name jupyterlite-p5-kernel -c conda-forge python=3.9 yarn jupyterlab
mamba activate jupyterlite-p5-kernel

# Install package in development mode
python -m pip install -e .

# Link your development version of the extension with JupyterLab
jlpm run install:extension

# Rebuild the extension Typescript source after making changes
jlpm run build

The extension should be linked to PREFIX/share/jupyter/labextensions and can be picked up by jupyterlite:

# Install jupyterlite
python -m pip install jupyterlite

# Build a new JupyterLite site
jupyter lite build

# Serve the site
jupyter lite serve

# Launch a browser to the Jupyterlite server url
python -m webbrowser http://localhost:8000/

References

p5.js

p5.js Learning Resources