This project integrates JupyterLite with the Pyodide kernel and custom extensions such as jl-galaxy
.
The jl-galaxy
extension enables Jupyter users to interact seamlessly with their Galaxy history — including loading and saving notebooks — through a fully integrated browser-based interface.
- Python 3.10.17+
- Node.js 20.19.1+
- npm 10.8.2+
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
This installs jupyterlite
, jupyterlite-pyodide-kernel
, and the gxy
utility module for Galaxy integration.
npm install
This installs JavaScript dependencies listed in package.json
, including custom JupyterLite extensions.
Run the full build to generate a standalone JupyterLite distribution:
npm run build
This will:
- Run
jupyter lite build
- Include the Pyodide kernel
- Bundle federated extensions like
jl-galaxy
- Output the final static site to:
./static/dist/_output
To serve the JupyterLite site locally:
npm run serve
Then open http://localhost:3000 in your browser.
The gxy
module provides Python functions to interact with the Galaxy API directly from JupyterLite.
Makes an HTTP request to a Galaxy API endpoint and returns the parsed JSON response.
await api("/api/histories")
await api("/api/histories", method="POST", data={"name": "New History"})
Downloads dataset(s) by HID, ID, or regex pattern. Saves them to Pyodide's virtual filesystem.
await get(3) # by HID
await get("some_id", identifier_type="id")
await get("myfile.*", identifier_type="regex")
Uploads a file from the virtual filesystem to the current Galaxy history.
await put("mydata.txt", "newname.txt", ext="txt")
Returns metadata for all visible datasets in the current history.
await get_history()
Returns the current history ID based on the dataset context.
await get_history_id()
Returns the Galaxy environment injected into the session via __gxy__
.
get_environment()
Used internally to resolve regex patterns to dataset identifiers.
- The
jl-galaxy
extension allows users to browse and manage Galaxy histories directly from the Jupyter UI. - All files must be placed within
static/dist/_output
; writing outside this directory breaks the build. - The upload helper uses
XMLHttpRequest
to work around Pyodide's limitations withfetch
.