Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fomightez/jupyterlite-xeus-demo
JupyterLite but with the Xeus-Python kernel so can pre-install packages, mainly at this time to demonstrate sidecar will work
https://github.com/fomightez/jupyterlite-xeus-demo
Last synced: 6 days ago
JSON representation
JupyterLite but with the Xeus-Python kernel so can pre-install packages, mainly at this time to demonstrate sidecar will work
- Host: GitHub
- URL: https://github.com/fomightez/jupyterlite-xeus-demo
- Owner: fomightez
- Created: 2024-09-18T15:52:04.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-15T15:29:05.000Z (3 months ago)
- Last Synced: 2024-11-07T14:12:51.094Z (about 2 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 1.81 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My xeus-python + JupyterLite demo
[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://fomightez.github.io/jupyterlite-xeus-demo/lab/?path=demo.ipynb)
xeus-python + JupyterLite deployed as a static site to GitHub Pages, for demo purposes.
Mainly, at this time to to demonstrate [sidecar](https://github.com/jupyter-widgets/jupyterlab-sidecar) works with JupyterLab flavor of JupyterLite, and that can combine to use [ipycanvas](https://github.com/jupyter-widgets-contrib/ipycanvas) in sidecar in JupyterLite.## ✨ Try it in your browser ✨
Notebook interface:
https://fomightez.github.io/jupyterlite-xeus-demo/notebooks/?path=demo.ipynbJupyterLab interface:
https://fomightez.github.io/jupyterlite-xeus-demo/lab/?path=demo.ipynb## ≠ How does it compare to the Pyodide kernel?
#### Pyodide kernel:
- Is based on [Pyodide](https://github.com/pyodide/pyodide)
- Uses [IPython](https://github.com/ipython/ipython) for the code execution (access to IPython magics, support for the inline Matplotlib backend, *etc*)
- Provides a way to dynamically install packages with ``piplite`` (**e.g.** ``await piplite.install("ipywidgets")``)
- **Does not support** sleeping with ``from time import sleep``
- **Does not support** pre-installing packages#### jupyterlite-xeus-python:
- Is based on [xeus-python](https://github.com/jupyter-xeus/xeus-python)
- Uses [IPython](https://github.com/ipython/ipython) for the code execution (access to IPython magics, support for the inline Matplotlib backend, *etc*)
- **Does not provide** a way to dynamically install packages (yet. We are working on building a ``mamba`` package manager for WASM)
- **Supports** sleeping with ``from time import sleep``
- **Supports** pre-installing packages from ``emscripten-forge`` and ``conda-forge``, by providing an ``environment.yml`` file defining the runtime environment## 💡 How to make your own deployment
![Deploy your own](deploy.gif)
Then your site will be published under https://{USERNAME}.github.io/{DEMO_REPO_NAME}
## 📦 How to install extra packages
You can pre-install extra packages for xeus-python by adding them to the ``environment.yml`` file.
For example, if you want to create a JupyterLite deployment with NumPy and Matplotlib pre-installed, you would need to edit the ``environment.yml`` file as following:
```yml
name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- xeus-python
- numpy
- matplotlib
```Only ``no-arch`` packages from ``conda-forge`` and packages from ``emscripten-forge`` can be installed.
- **How do I know if a package is ``no-arch`` on ``conda-forge``?** ``no-arch`` means that the package is OS-independent, usually pure-python packages are ``no-arch``. To check if your package is ``no-arch`` on ``conda-forge``, check if the "Platform" entry is "no-arch" in the https://beta.mamba.pm/channels/conda-forge?tab=packages page. If your package is not ``no-arch`` but is a pure Python package, then you should probably update the feedstock to turn your package into a ``no-arch`` one.
![](noarch.png)
- **How do I know if my package is on ``emscripten-forge``?** You can see the list of packages pubished on ``emscripten-forge`` [here](https://beta.mamba.pm/channels/emscripten-forge?tab=packages). In case your package is missing, or it's not up-to-date, feel free to open an issue or a PR on https://github.com/emscripten-forge/recipes.