JupyterLite: Jupyter ❤️ WebAssembly & Python

JupyterLite is a JupyterLab distribution that runs entirely in the web browser, backed by in-browser language kernels.

:zap: Try it online

https://jupyterlite.github.io/demo/

:sparkles: Highlights

Browser-based Interactive Computing

  • Python kernel backed by Pyodide running in a Web Worker
    • Initial support for interactive visualization libraries such as altair, bqplot,
      ipywidgets, matplotlib, and plotly
  • JavaScript and P5.js kernels running in an IFrame
  • View hosted example Notebooks and other files, then edit, save, and download from the
    browser’s IndexedDB (or localStorage)
  • Support for saving settings for JupyterLab/Lite core and federated extensions
  • Basic session and kernel management to have multiple kernels running at the same time
  • Support forCode Consoles

Ease of Deployment

  • Served via well-cacheable, static HTTP(S), locally or on most static web hosts
  • Embeddable within larger applications
  • Requires no dedicated application server much less a container orchestrator
  • Fine-grained configurability of page settings, including reuse of federated
    extensions

For more info:

:mega: Check out the announcement blog post:

:bird: Like and retweet the announcement tweet:

Thanks!

14 Likes

Hey folks! It seems :santa: Père Noël came last night, and left some surprises in our shoes! :hiking_boot:

jupyterlite 0.1.0a18

jupyterlite 0.1.0a18 is on PyPI. Some of the new features have extra dependencies, so the quickest way to install everything is:

pip install jupyterlite=0.1.0a18[all]

Who cares?

0.1.0a18 (and the last couple releases) have gotten up to where a Lite site can be configured to be entirely self-hosted, such that it doesn’t rely on any third-party services at run-time.

Some build-time configuration options, introduced recently, that will download (or otherwise acquire) the needed assets and update config files:

  • pyodide_url will download the 180mb pyodide bz2 release
  • mathjax_dir will load 9mb of assets
    • automatic if jupyter-server-mathjax is installed
  • wheel_urls will download individual wheel URLs or paths, or index a local directory

Meanwhile, at run-time:

With this setup, a lite site can be entirely self-contained, meaning it can be:

  • shipped on a a USB stick and used offline with a local web server (e.g. python -m http.server)
  • shared on the distributed web with ipfs or dat
  • packaged as part of a web application

What’s next? (you can help!)

The last few releases have gotten really far towards something that can be useful, but it is a pretty complicated process. A serious documentation overhaul is being planned and feedback there would be very appreciated!

For a content creator, part of having a more documentable process might be integrating more closely with other, more familiar tools, such as sphinx or jupyter(lab) itself, to get content creators get more productive more quickly.

For developers, now that it’s possible to install third-party kernels, we’re hoping to see some new kernels, and best practices around building, deploying, and documenting them, for different communities. Some upcoming work will enable even more flexibility, with arbitrary “HTTP” and “WebSocket” routes.

Finally, we’ve added some baseline browser tests… but can always to do more!

Stay tuned!

4 Likes

jupyterlite 0.1.0a19 is out. This is an upstream-focused release, with new versions of JupyterLab & RetroLab as well as an interesting new version of pyodide which is interesting in its own right.

Of course, at basically the exact same time, IPython 8.0.0 also came out, and we haven’t tested it out in the browser yet. :blush:

Stay tuned for more stuff in 2022!

3 Likes

Skipped a month of updates, but things have been busy!

Stay tuned, hopeful more to come soon!

5 Likes

Hello friends!

Whew, what a year! Since that last update, the JupyterLite team still can’t claim shipping a “real” 0.1.0 release :crying_cat_face: … but 20 beta releases later, we have been busy churning out lots of bugfixes, interesting new features, bugs in those features, and then more bug fixes. And packages. Lots of packages. And a workshop. Which mostly talked about… packages. So many packages.

But the reward is: lots of communities have been building really cool stuff that works with (or is built on) JupyterLite. :heart_eyes_cat: And even some things that used to not work in JupyterLite now do. And sometimes, we didn’t have to do them.

Starting with the good released today:

jupyterlite 0.1.0b22

File Uploads from <1mb :scroll: to ~50mb :file_cabinet:

Because JupyterLite is about your files, losing data felt really bad.

b22 reworks files uploads in the File Browser and the Open from URL command. Before, files over 1mb would reliably, but silently, be broken. The effective ceiling is now much closer to some of the limitations of the browser, with files up to 50mb. We’re still working on some tests, but hope this feature opens up some exciting use cases.

Updating (and pinning… because you pin your pre-release software… right? right?), you may notice a few more things:

jupyterlite 0.1.0b20

Finer-grained Packaging

It has been possible to use JupyterLab’s syntax for disabling any extension, include the default JS and pyodide-based Python kernel, and remix them with whichever extensions (including browser-based kernels) a site builder prefers. However, these usually still got sent to the browser. For every page view.

This release split the contents of the previous jupyterlite PyPI package into a few different packages:

While the CLI has mostly stayed the same, some configuration (especially around jupyterlite-pyodide-kernel) has moved to new names: as usual the documentation and examples and demo remain the best places to see the practical impacts of these changes.

Beyond 0.1.0b22

Your humble author learned their lesson, and is done making predictions!

But PRs talk louder than words, with most of the below being things you can try out right now, right in your browser, without installing anything:

Have fun sharing interactive computing in the browser!

7 Likes