Skip to main content

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

  1. Discovers locally-tracked workspaces via nebi workspace list
  2. Enumerates pixi environments per workspace via pixi workspace environment list
  3. Each (workspace, environment) pair appears as a selectable kernel in Jupyter
  4. Kernels launch via pixi run in 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 init in a pixi project)

Usage

Once installed, any nebi-tracked pixi workspace appears as a kernel in JupyterLab or Notebook:

  • A workspace data-science with environments default and gpu shows as two kernels: data-science (default) and data-science (gpu)
  • A workspace web-app with 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 list output, calls pixi workspace environment list per workspace. Filters out missing workspaces. Returns structured data.
  • launcher.py — Clears PIXI_* environment variables to prevent inheriting parent context, then exec's pixi run in the workspace directory.
  • manager.py — Subclasses KernelSpecManager, implements find_kernel_specs() and get_kernel_spec(). Merges parent kernels with nebi-discovered ones.

License

MIT

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nb_nebi_kernels-0.1.tar.gz (50.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nb_nebi_kernels-0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

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

Hashes for nb_nebi_kernels-0.1.tar.gz
Algorithm Hash digest
SHA256 e2e9bde7a959e778f832e8ba1abf168709f1b03e5193c9894991e3df684ea953
MD5 fbdc1655247e1eb25ed51474acfc4e75
BLAKE2b-256 fc8ef00cb825158dca9ceb299eaada26b0e4f195d3f5e85b0e3642a51ef1f209

See more details on using hashes here.

Provenance

The following attestation bundles were made for nb_nebi_kernels-0.1.tar.gz:

Publisher: release.yaml on nebari-dev/nb-nebi-kernels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for nb_nebi_kernels-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6494d685112e43c38f04cb706320db96c526448411ca1c31f358caa50a54d4
MD5 a225cb34d5a50a424e48536b9e6ac706
BLAKE2b-256 c1bbff2ec25b56acabf288b38cdc977619347ab6e0f98c119cf0101f6644d904

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page