JupyterLab extension to open the Spark Web UI via the notebook proxy
Project description
jupyterlab-spark-webui
A JupyterLab extension that adds a Spark UI menu entry to the menu bar. When clicked, it checks whether Apache Spark is running on port 4040 and opens the Spark jobs page as an embedded JupyterLab tab via jupyter-server-proxy.
Requirements
| Requirement | Version |
|---|---|
| JupyterLab | ≥ 4.0 |
| jupyter-server-proxy | ≥ 4.0 |
| Python | ≥ 3.8 |
Installation
pip install jupyterlab-spark-webui
No additional steps are needed. JupyterLab discovers the extension automatically after installation.
Verify installation
jupyter labextension list
# jupyterlab-spark-webui v0.1.0 enabled OK
Usage
- Start a Spark session in a notebook (this starts the Spark UI on port 4040).
- Click Spark UI in the JupyterLab menu bar.
- Click Open Spark UI.
- If Spark is running → the jobs page opens as a JupyterLab tab.
- If Spark is not running → a dialog displays "No Spark found (port 4040)."
The extension resolves the proxy URL from the current page path, so it works
in JupyterHub deployments at any base URL prefix
(e.g. /notebook/<namespace>/<name>/lab).
Uninstallation
pip uninstall jupyterlab-spark-webui
Development
Prerequisites
- Python ≥ 3.8 with uv
- Node.js ≥ 18 with npm
Setup and build
git clone https://github.com/your-org/jupyterlab-spark-webui
cd jupyterlab-spark-webui
./build.sh # build everything + produce dist/*.whl
./start-lab.sh # launch JupyterLab with the extension loaded
Pass --no-wheel to skip the wheel build during development iteration:
./build.sh --no-wheel
Project structure
├── src/
│ └── index.ts # Extension entry point (TypeScript)
├── jupyterlab_spark_webui/
│ ├── __init__.py # Python package / labextension path declaration
│ └── labextension/ # Built JS bundle (generated by build.sh)
├── style/
│ └── index.css
├── pyproject.toml # Python package metadata and build config
├── package.json # npm package and TypeScript dependencies
├── tsconfig.json # TypeScript compiler config
├── build.sh # Full build + deploy + wheel script
└── start-lab.sh # Launch JupyterLab using the uv environment
Publishing to PyPI
1. Prerequisites
- A PyPI account
- A PyPI API token (generate one at Account settings → API tokens)
2. Update metadata
Edit pyproject.toml and set the correct authors, [project.urls], and
bump version before each release.
3. Build
./build.sh # produces dist/jupyterlab_spark_webui-<version>-py3-none-any.whl
4. Publish
With uv (recommended):
uv publish --token pypi-<your-token>
Or with twine:
pip install twine
twine upload dist/* --username __token__ --password pypi-<your-token>
5. Test on TestPyPI first (optional but recommended)
# Publish to the test registry
uv publish --publish-url https://test.pypi.org/legacy/ --token pypi-<test-token>
# Install from the test registry
pip install --index-url https://test.pypi.org/simple/ jupyterlab-spark-webui
Checklist before publishing
-
versionbumped inpyproject.tomlandpackage.json -
authorsand[project.urls]filled in -
./build.shran successfully anddist/*.whlexists - Extension verified working locally via
./start-lab.sh -
git tag v<version>created and pushed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyterlab_spark_webui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jupyterlab_spark_webui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e88c45b39564286566bf3504aba70be44a318e33a4a3afc8083bd97198a0e4a
|
|
| MD5 |
ab4af5bc44a093fc6e598d972e8a59da
|
|
| BLAKE2b-256 |
181e8346fa2958b08a3efd0ecdba8115e84bd3a85c819c9d3f557716612ff9d4
|