Jupyter KernelSpecManager that discovers kernels from nebi-tracked pixi workspaces
Project description
nb-nebi-kernels
A custom Jupyter KernelSpecManager that automatically discovers Nebi-tracked Pixi workspaces and exposes each environment as a launchable Jupyter kernel.
How it works
- Discovers locally-tracked workspaces via
nebi workspace list - Enumerates pixi environments per workspace via
pixi workspace environment list - Each (workspace, environment) pair appears as a selectable kernel in Jupyter
- Kernels launch via
pixi runin the workspace directory with full environment isolation
Installation
pip install nb-nebi-kernels
That's it — the kernel spec manager is automatically configured when installed into your JupyterLab environment.
Prerequisites
- Nebi CLI on your PATH
- Pixi on your PATH
- At least one tracked nebi workspace (
nebi initin a pixi project)
Usage
Once installed, any nebi-tracked pixi workspace appears as a kernel in JupyterLab or Notebook:
- A workspace
data-sciencewith environmentsdefaultandgpushows as two kernels: data-science (default) and data-science (gpu) - A workspace
web-appwith only the default environment shows as just web-app
If nebi or pixi are not installed, or no workspaces are tracked, Jupyter falls back to its default kernels — it never crashes.
Development
# Install dev dependencies
pixi install -e dev
# Run tests
pixi run test
# Run tests with coverage
pixi run test-cov
# Run linting
pixi run lint
# Format code
pixi run format
# Run type checking
pixi run typecheck
Architecture
src/nb_nebi_kernels/
├── __init__.py # Exports NebiKernelSpecManager
├── discovery.py # Subprocess calls to nebi + pixi CLIs
├── launcher.py # Kernel launcher with pixi environment isolation
└── manager.py # KernelSpecManager subclass (core logic)
- discovery.py — Parses
nebi workspace listoutput, callspixi workspace environment listper workspace. Filters out missing workspaces. Returns structured data. - launcher.py — Clears PIXI_* environment variables to prevent inheriting parent context, then exec's
pixi runin the workspace directory. - manager.py — Subclasses
KernelSpecManager, implementsfind_kernel_specs()andget_kernel_spec(). Merges parent kernels with nebi-discovered ones.
License
MIT
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 Distribution
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 nb_nebi_kernels-0.1.tar.gz.
File metadata
- Download URL: nb_nebi_kernels-0.1.tar.gz
- Upload date:
- Size: 50.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2e9bde7a959e778f832e8ba1abf168709f1b03e5193c9894991e3df684ea953
|
|
| MD5 |
fbdc1655247e1eb25ed51474acfc4e75
|
|
| BLAKE2b-256 |
fc8ef00cb825158dca9ceb299eaada26b0e4f195d3f5e85b0e3642a51ef1f209
|
Provenance
The following attestation bundles were made for nb_nebi_kernels-0.1.tar.gz:
Publisher:
release.yaml on nebari-dev/nb-nebi-kernels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nb_nebi_kernels-0.1.tar.gz -
Subject digest:
e2e9bde7a959e778f832e8ba1abf168709f1b03e5193c9894991e3df684ea953 - Sigstore transparency entry: 1019529612
- Sigstore integration time:
-
Permalink:
nebari-dev/nb-nebi-kernels@da649c3750beb7cf474b4a30bd2a861ebc1c7745 -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/nebari-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@da649c3750beb7cf474b4a30bd2a861ebc1c7745 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nb_nebi_kernels-0.1-py3-none-any.whl.
File metadata
- Download URL: nb_nebi_kernels-0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf6494d685112e43c38f04cb706320db96c526448411ca1c31f358caa50a54d4
|
|
| MD5 |
a225cb34d5a50a424e48536b9e6ac706
|
|
| BLAKE2b-256 |
c1bbff2ec25b56acabf288b38cdc977619347ab6e0f98c119cf0101f6644d904
|
Provenance
The following attestation bundles were made for nb_nebi_kernels-0.1-py3-none-any.whl:
Publisher:
release.yaml on nebari-dev/nb-nebi-kernels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nb_nebi_kernels-0.1-py3-none-any.whl -
Subject digest:
cf6494d685112e43c38f04cb706320db96c526448411ca1c31f358caa50a54d4 - Sigstore transparency entry: 1019529623
- Sigstore integration time:
-
Permalink:
nebari-dev/nb-nebi-kernels@da649c3750beb7cf474b4a30bd2a861ebc1c7745 -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/nebari-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@da649c3750beb7cf474b4a30bd2a861ebc1c7745 -
Trigger Event:
release
-
Statement type: