Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

jtpio/replite

Repository files navigation

replite

⚠️ Archived ⚠️

JupyterLite now includes a REPL application by default.

Check out the documentation to learn how to use it and configure it: https://jupyterlite.readthedocs.io/en/latest/quickstart/embed-repl.html


An embeddable REPL, powered by JupyterLite.

replite-numpy

Usage

To embed the code console in your website:

<iframe src="https://replite.vercel.app/repl/index.html" width="100%" height="100%">
</iframe>

Configuration

The behavior and the look of the REPL can be configured via URL parameters.

Select a kernel by default

To avoid the kernel selection dialog and choose a given kernel by default:

<iframe src="https://replite.vercel.app/repl?kernel=python" width="100%" height="100%">
</iframe>

Enable the toolbar

The toolbar can be enabled (opt-in) to add a couple of useful buttons:

<iframe src="https://replite.vercel.app/repl?toolbar=1" width="100%" height="100%">
</iframe>

toolbar

Auto execute code on startup

Custom starter code can automatically be executed on startup:

<iframe src="https://replite.vercel.app/repl?kernel=python&code=import numpy as np" width="100%" height="100%">
</iframe>
auto-execute.mp4

Themes

It is also possible to select a theme, for example JupyterLab Dark:

<iframe src="https://replite.vercel.app/repl?theme=JupyterLab Dark" width="100%" height="100%">
</iframe>

Additional themes can be installed with pip if they are distributed as a JupyterLab prebuilt extension. For example:

pip install jupyterlab-gt-coar-theme
themes.mp4

Create your custom deployment

TBD