mcpField
J
jupyter-notebook

jupyter-notebook

github.com/i9wa4Data & databases1245 installsUpdated today
Repository

About jupyter-notebook

jupyter-notebook is a skill that guides notebook execution with Jupyter commands, including local Python and Databricks kernels. It is for users running notebooks and provides command options and required Databricks environment variables.

Key features

  1. 01Execute notebooks with Jupyter
  2. 02Use local Python or Databricks kernels
  3. 03Set execution timeouts
  4. 04Overwrite notebooks with results
  5. 05Configure Databricks environment variables

Use cases

  1. 01Running a notebook with a local Python kernel
  2. 02Executing a notebook on a Databricks cluster
  3. 03Choosing timeout and error-handling options

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/i9wa4/dotfiles --skill jupyter-notebook

After installing, type/jupyter-notebookin Claude Code to confirm it loaded.

Details

From the project README

Jupyter Notebook Expert Skill

This skill provides a guide for Jupyter Notebook execution.

1. Databricks Jupyter Kernel

https://github.com/i9wa4/jupyter-databricks-kernel

uv pip install jupyter-databricks-kernel
uv run python -m jupyter_databricks_kernel.install

2. Default Execution Method

When instructed to execute an entire notebook, use this command:

uv run jupyter execute <notebook_path> --inplace --timeout=300

3. Execute with Databricks Kernel

When running notebook on Databricks cluster:

uv run jupyter execute <notebook_path> --inplace --kernel_name=databricks --timeout=300

Required environment variables:

  • DATABRICKS_HOST: Databricks workspace URL
  • DATABRICKS_TOKEN: Personal Access Token
  • DATABRICKS_CLUSTER_ID: Cluster ID

4. Usage Examples

# Execute with local Python kernel
uv run jupyter execute /workspace/notebooks/sample.ipynb --inplace --timeout=300

# Execute with Databricks kernel
uv run jupyter execute /workspace/notebooks/databricks-sample.ipynb --inplace --kernel_name=databricks --timeout=300

5. Option Descriptions

  • --inplace: Overwrite original file with execution results
  • --kernel_name=<name>: Specify kernel to use (databricks, python3, etc.)
  • --timeout=<seconds>: Set timeout in seconds (-1 for unlimited)
  • --startup_timeout=<seconds>: Kernel startup timeout (default 60 seconds)
  • --allow-errors: Continue execution to end even with errors

6. Notes

  • Verify required environment variables are properly set before execution
  • Adjust --timeout value for long-running cells
  • If open in VS Code, verify file updates after execution
  • For Databricks kernel, cluster startup takes 5-6 minutes if stopped

7. Reference Links

Comments

Markdown supported