Skip to main content

A tool designed to execute parameterized notebooks using papermill, allowing dynamic input and output capture for automated workflows.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_tool_jupyterexecutenotebookwithparameters


Swarmauri Tool Jupyter Execute Notebook With Parameters

Runs a Jupyter notebook with injected parameters using Papermill-style execution.

Features

  • Parameterizes notebooks via Papermill and executes them end-to-end.
  • Saves the executed notebook to an output path of your choice.
  • Returns a dict containing executed_notebook on success or error/message when execution fails.

Prerequisites

  • Python 3.10 or newer.
  • Papermill, nbformat, nbconvert, swarmauri base/core packages (installed automatically).
  • Notebook dependencies must be available in the runtime environment.

Installation

# pip
pip install swarmauri_tool_jupyterexecutenotebookwithparameters

# poetry
poetry add swarmauri_tool_jupyterexecutenotebookwithparameters

# uv (pyproject-based projects)
uv add swarmauri_tool_jupyterexecutenotebookwithparameters

Quickstart

from swarmauri_tool_jupyterexecutenotebookwithparameters import JupyterExecuteNotebookWithParametersTool

executor = JupyterExecuteNotebookWithParametersTool()
response = executor(
    notebook_path="templates/report.ipynb",
    output_notebook_path="outputs/report-filled.ipynb",
    params={
        "input_data_path": "data/input.csv",
        "run_mode": "production",
    },
    timeout=600,
)

if "executed_notebook" in response:
    print("Notebook executed:", response["executed_notebook"])
else:
    print("Error:", response["error"], response.get("message"))

Tips

  • Parameters can be any JSON-serializable values used inside the notebook (strings, numbers, dictionaries, etc.).
  • Increase timeout for notebooks with lengthy cells.
  • Combine with Swarmauri notebook cleaning/conversion tools for full pipelines (execute → clear outputs → convert to PDF/HTML).

Want to help?

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

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

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

File details

Details for the file swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev5.tar.gz.

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev5.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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}

File hashes

Hashes for swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev5.tar.gz
Algorithm Hash digest
SHA256 a027b4199a027569c48c26df20d6af79fd992e37a7716e58b106b095f8d8ff9f
MD5 add4de691e6e5279667bdbc8a90038b3
BLAKE2b-256 ac64952788ba116fcdce3ae6aa5ec309fcbeb1b663b482cebf7f37cfdcc55d14

See more details on using hashes here.

File details

Details for the file swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev5-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev5-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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}

File hashes

Hashes for swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 96c8041c965a6b820b719cbee0f94d73a6482ee29216c4b62f5eba55d5a76fd7
MD5 83ed44b0bf6b951651b7c68e5ef8d2be
BLAKE2b-256 f023979d88f6cbe555fd72c331f80f150ffc9d2aebfc05af802040a02058623d

See more details on using hashes here.

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