Skip to main content

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_tool_jupyterexecutenotebook


Swarmauri Tool Jupyter Execute Notebook

Executes all cells of a Jupyter notebook using nbclient and returns the executed NotebookNode with captured outputs.

Features

  • Runs notebooks programmatically via the Swarmauri tool interface.
  • Accepts optional per-cell timeout (default 30 seconds) and continues on cell errors.
  • Returns the executed notebook object so downstream tools can inspect outputs or save it.

Prerequisites

  • Python 3.10 or newer.
  • Jupyter/nbconvert stack available (nbclient, nbformat, ipykernel, etc.—installed automatically).
  • Notebook dependencies must be installed in the environment where the tool runs.

Installation

# pip
pip install swarmauri_tool_jupyterexecutenotebook

# poetry
poetry add swarmauri_tool_jupyterexecutenotebook

# uv (pyproject-based projects)
uv add swarmauri_tool_jupyterexecutenotebook

Quickstart

from swarmauri_tool_jupyterexecutenotebook import JupyterExecuteNotebookTool

executor = JupyterExecuteNotebookTool()
executed_nb = executor(
    notebook_path="notebooks/example.ipynb",
    timeout=120,
)

# Save the executed notebook
import nbformat, json
from pathlib import Path

Path("notebooks/example-executed.ipynb").write_text(
    nbformat.writes(executed_nb),
    encoding="utf-8",
)

Tips

  • Increase timeout for notebooks with long-running cells to avoid CellTimeoutError.
  • Set allow_errors=True (default in the tool) so execution continues after a failing cell while error traces are still recorded.
  • Combine with JupyterClearOutputTool or conversion tools to build end-to-end notebook pipelines.

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Metadata

Release files for swarmauri_tool_jupyterexecutenotebook 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_tool_jupyterexecutenotebook 0.10.0
File Size Uploaded
swarmauri_tool_jupyterexecutenotebook-0.10.0.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_tool_jupyterexecutenotebook 0.10.0
File Interpreter ABI Platform
swarmauri_tool_jupyterexecutenotebook-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.0 kB

Release files / swarmauri_tool_jupyterexecutenotebook-0.10.0.tar.gz

Download URL swarmauri_tool_jupyterexecutenotebook-0.10.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8bbf62e3d5b568fd328d082718b9c40ad20767abc4eb2a27cb91965f7baa9ed7
BLAKE2b-256 checksum
How to use checksums
27ecf32657de58b21eb371e488d67a0e5f882fa92ad899547fc4929b7facc919
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_tool_jupyterexecutenotebook-0.10.0-py3-none-any.whl

Download URL swarmauri_tool_jupyterexecutenotebook-0.10.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b08e29ae511e5a460b22bd072d34ce1a150306aa01e5d3b56b7296bb9aa05d4d
BLAKE2b-256 checksum
How to use checksums
a5c97a70ec20cdcbd73520c23968c020742b91731028ce050e9d412d3f92ca8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page