{"id":42184625,"url":"https://github.com/datalab-platform/datalab-kernel","last_synced_at":"2026-02-15T17:44:21.804Z","repository":{"id":334057732,"uuid":"1139870661","full_name":"DataLab-Platform/DataLab-Kernel","owner":"DataLab-Platform","description":"A standalone Jupyter kernel providing seamless, reproducible access to DataLab workspaces, with optional live synchronization to the DataLab GUI","archived":false,"fork":false,"pushed_at":"2026-01-26T20:15:18.000Z","size":224,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T07:48:12.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataLab-Platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-22T14:26:06.000Z","updated_at":"2026-01-26T20:15:21.000Z","dependencies_parsed_at":"2026-01-29T15:00:28.836Z","dependency_job_id":null,"html_url":"https://github.com/DataLab-Platform/DataLab-Kernel","commit_stats":null,"previous_names":["datalab-platform/datalab-kernel"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DataLab-Platform/DataLab-Kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataLab-Platform%2FDataLab-Kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataLab-Platform%2FDataLab-Kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataLab-Platform%2FDataLab-Kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataLab-Platform%2FDataLab-Kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataLab-Platform","download_url":"https://codeload.github.com/DataLab-Platform/DataLab-Kernel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataLab-Platform%2FDataLab-Kernel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28880017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-26T22:21:04.520Z","updated_at":"2026-02-15T17:44:21.785Z","avatar_url":"https://github.com/DataLab-Platform.png","language":"Python","readme":"# DataLab-Kernel\n\n[![license](https://img.shields.io/pypi/l/datalab-kernel.svg)](./LICENSE)\n[![pypi version](https://img.shields.io/pypi/v/datalab-kernel.svg)](https://pypi.org/project/datalab-kernel/)\n[![PyPI status](https://img.shields.io/pypi/status/datalab-kernel.svg)](https://github.com/DataLab-Platform/DataLab-Kernel)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/datalab-kernel.svg)](https://pypi.org/project/datalab-kernel/)\n[![Documentation (stable)](https://img.shields.io/badge/docs-stable-green?logo=readthedocs\u0026logoColor=white)](https://datalab-kernel.readthedocs.io/en/stable/)\n[![Documentation (latest)](https://img.shields.io/badge/docs-latest-brightgreen?logo=readthedocs\u0026logoColor=white)](https://datalab-kernel.readthedocs.io/en/latest/)\n[![Quick Start](https://img.shields.io/badge/Quick_Start-notebook.link-e2d610?logo=jupyter\u0026logoColor=white)](https://notebook.link/github/DataLab-Platform/DataLab-Kernel/tree/main/notebooks/?path=/notebooks/datalab_kernel_quickstart.ipynb)\n[![Advanced Showcase](https://img.shields.io/badge/Advanced_Showcase-notebook.link-e2d610?logo=jupyter\u0026logoColor=white)](https://notebook.link/github/DataLab-Platform/DataLab-Kernel/tree/main/notebooks/?path=%2Fnotebooks%2Fdatalab_kernel_advanced.ipynb)\n\n**A standalone [Xeus-Python](https://github.com/jupyter-xeus/xeus-python)-based Jupyter kernel providing seamless, reproducible access to DataLab workspaces, with optional live synchronization to the DataLab GUI.**\n\n---\n\n## Overview\n\n**DataLab-Kernel** is a custom Jupyter kernel designed to bridge **DataLab** and the **Jupyter** ecosystem. It is built on top of [**Xeus-Python**](https://github.com/jupyter-xeus/xeus-python), a lightweight and efficient Python kernel for Jupyter that offers improved performance, native debugger support, and excellent Qt event loop integration.\n\nThanks to Xeus-Python's architecture, DataLab-Kernel runs seamlessly in both:\n\n- **Native Jupyter environments** (JupyterLab, Jupyter Notebook, VS Code)\n- **[JupyterLite](https://jupyterlite.readthedocs.io/)** (browser-based Jupyter, no server required)\n\nThis enables scientists and engineers to:\n\n- run reproducible analyses in Jupyter notebooks,\n- interact transparently with DataLab’s internal workspace when DataLab is running,\n- share notebooks that can be replayed **with or without DataLab**,\n- combine narrative, code, and results without sacrificing interactive visualization.\n\nDataLab-Kernel is **not** a replacement for DataLab’s GUI.\nIt is a **complementary execution layer** that turns DataLab into a hybrid scientific platform:\n**GUI-driven when needed, notebook-driven when appropriate.**\n\n---\n\n## Try it Online\n\n**Experience DataLab-Kernel instantly in your browser** — no installation required!\n\n| | |\n| --- | --- |\n| [![Quick Start](https://img.shields.io/badge/Quick_Start-notebook.link-e2d610?logo=jupyter\u0026logoColor=white)](https://notebook.link/github/DataLab-Platform/DataLab-Kernel/tree/main/notebooks/?path=/notebooks/datalab_kernel_quickstart.ipynb) | Introduction to Workspace, Plotter, and basic Sigima processing |\n| [![Advanced Showcase](https://img.shields.io/badge/Advanced_Showcase-notebook.link-e2d610?logo=jupyter\u0026logoColor=white)](https://notebook.link/github/DataLab-Platform/DataLab-Kernel/tree/main/notebooks/?path=%2Fnotebooks%2Fdatalab_kernel_advanced.ipynb) | Advanced plotting, signal/image processing, ROI, and analysis |\n\nClick a badge to open the notebook in a live JupyterLite environment powered by [**notebook.link**](https://notebook.link/). This service, developed by [**QuantStack**](https://quantstack.net/), enables sharing and running Jupyter notebooks directly in the browser with zero setup.\n\n---\n\n## Documentation\n\n📖 Full documentation is available at:\n👉 \u003chttps://datalab-kernel.readthedocs.io/\u003e\n\n\u003e Want to use DataLab-Kernel inside DataLab with GUI tools?\n\u003e Check out the full platform: [DataLab](https://datalab-platform.com/)\n\n---\n\n## Key Features\n\n- **Single, stable user API**\n  - `workspace` for data access and persistence\n  - `plotter` for visualization (Plotly interactive or Matplotlib static)\n  - `sigima` for scientific processing\n\n- **Two execution modes, one notebook**\n  - **Live mode**: automatic synchronization with a running DataLab instance\n  - **Standalone mode**: notebook-only execution, fully reproducible\n\n- **Reproducibility by design**\n  - Analyses can be saved and reloaded using `.h5` files\n  - Notebooks run unchanged across environments\n\n- **Smart visualization backend**\n  - Plotly (interactive) preferred when installed, Matplotlib (static) fallback\n  - Switch backends at runtime with `plotter.set_backend(\"matplotlib\")`\n  - Override via `DATALAB_PLOTTER_BACKEND` environment variable\n\n- **Performance-aware**\n  - Optimized data handling when DataLab is attached\n  - No unnecessary serialization for large datasets\n\n- **Decoupled architecture**\n  - Installable independently of DataLab\n  - DataLab is a privileged host, not a requirement\n\n---\n\n## Typical Usage\n\n```python\nimg = workspace.get(\"i042\")\nfiltered = sigima.proc.image.butterworth(img, cut_off=0.2)\nworkspace.add(\"filtered_i042\", filtered)\nplotter.plot(\"filtered_i042\")  # interactive Plotly figure (or static PNG)\n```\n\nDepending on the execution context:\n\n- the result appears inline in the notebook,\n- and, if DataLab is running, it also appears automatically in the DataLab GUI,\n  with views and metadata kept in sync.\n\n---\n\n## Execution Modes\n\n### Live Mode (DataLab-attached)\n\n- DataLab launches a Jupyter server and starts `kernel-datalab`.\n- The kernel detects DataLab at runtime.\n- Workspace operations and visualizations are synchronized with the GUI.\n\nConnection is automatic via **auto-discovery**: DataLab-Kernel finds running DataLab instances\nvia a connection file written by DataLab, or by probing the well-known port (18080).\n\n**No environment variables or manual configuration needed** — just start DataLab with\nthe Web API enabled and load the kernel extension.\n\n### Standalone Mode (Notebook-only)\n\n- The kernel is used like any standard Jupyter kernel.\n- No DataLab installation or GUI is required.\n- Data are managed locally and persisted to `.h5` files.\n\n**The same notebook runs unchanged in both modes.**\n\n---\n\n## Installation\n\n### Standalone usage (desktop Jupyter)\n\n```bash\npip install datalab-kernel[cli] sigima\npython -m datalab_kernel install\njupyter lab\n```\n\nThen select **DataLab Kernel** from the kernel list.\n\n### JupyterLite\n\nDataLab-Kernel is compatible with **JupyterLite** (browser-based Jupyter).\nIn this environment, kernels are bundled at build time, so you load DataLab-Kernel\nas an IPython extension instead.\n\n**1. Add to your `environment.yml`:**\n\n```yaml\nname: xeus-python-kernel\nchannels:\n  - https://repo.mamba.pm/emscripten-forge\n  - conda-forge\ndependencies:\n  - numpy\n  - matplotlib\n  - h5py\n  - datalab-kernel\n  - sigima\n```\n\n**2. Load the extension in your notebook:**\n\n```python\n%load_ext datalab_kernel\n```\n\nThis injects the DataLab namespace (`workspace`, `plotter`, `sigima`, etc.)\ninto your environment.\n\nThe `[cli]` extra is not needed in JupyterLite since `jupyter-client` depends\non `pyzmq`, which requires native sockets unavailable in WebAssembly.\n\n### Dependencies\n\nDataLab-Kernel uses **xeus-python** as its backend, which provides:\n\n- Improved performance compared to ipykernel\n- Native debugger support\n- JupyterLite compatibility\n- Better Qt event loop integration\n\nThe kernel requires:\n\n- `xeus-python\u003e=0.17.0` - The xeus-based Python kernel\n- `xeus-python-shell\u003e=0.6.0` - Python shell utilities for xeus-python\n- `sigima\u003e=1.0` - Scientific signal and image processing\n- `numpy\u003e=1.22`, `h5py\u003e=3.0`, `matplotlib\u003e=3.5`\n\nOptional dependencies (via extras):\n\n- `[plotly]` — `plotly\u003e=5.0` for interactive plots (auto-used when installed)\n- `[cli]` — `jupyter-client\u003e=7.0` for `install`/`uninstall` CLI commands\n\n### With DataLab\n\nWhen installed alongside DataLab, the kernel is automatically available and can be launched directly from the DataLab interface.\n\n### Installing from conda-forge (recommended)\n\nFor best compatibility, especially on Windows:\n\n```bash\nmamba create -n datalab-kernel\nmamba activate datalab-kernel\nmamba install xeus-python datalab-kernel -c conda-forge\npython -m datalab_kernel install\n```\n\n---\n\n## Visualization Backends\n\nDataLab-Kernel supports two plotting backends:\n\n| Backend    | Output               | Install                          |\n| ---------- | -------------------- | -------------------------------- |\n| **Plotly** | Interactive HTML     | `pip install datalab-kernel[plotly]` |\n| **Matplotlib** | Static PNG       | Included by default              |\n\nWhen both are installed, **Plotly is used automatically** for its richer\ninteractive experience. You can switch at any time:\n\n```python\n# Check current backend\nprint(plotter.backend)  # \"plotly\" or \"matplotlib\"\n\n# Switch at runtime\nplotter.set_backend(\"matplotlib\")\nplotter.plot(\"my_signal\")  # static PNG\n\nplotter.set_backend(\"plotly\")\nplotter.plot(\"my_signal\")  # interactive figure\n```\n\nOr set the default before starting the kernel via an environment variable:\n\n```bash\nexport DATALAB_PLOTTER_BACKEND=matplotlib\n```\n\n---\n\n## Persistence and Sharing\n\nWorkspace state can be saved and reloaded:\n\n```python\nworkspace.save(\"analysis.h5\")\nworkspace.load(\"analysis.h5\")\n```\n\nThis enables:\n\n- sharing notebooks and data with collaborators,\n- replaying analyses without DataLab,\n- resuming workflows inside DataLab by reopening the associated project.\n\n---\n\n## Project Status\n\nDataLab-Kernel is under active design and development.\n\n---\n\n## License\n\nThis project is released under an open-source license (see `LICENSE` file).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalab-platform%2Fdatalab-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatalab-platform%2Fdatalab-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalab-platform%2Fdatalab-kernel/lists"}