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.dev7.tar.gz.

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev7.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.dev7.tar.gz
Algorithm Hash digest
SHA256 4f89add51bc2f416877681e123247473f61b4a7b088de07b4f35c3ae34ea3c6b
MD5 67dc122fda1963e85cf6bb8e045d78cc
BLAKE2b-256 31d7a80059d42f80e9751947640b516c8bdc98b66c970aa566e9e844ff80eea3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.dev7-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.dev7-py3-none-any.whl
Algorithm Hash digest
SHA256 cd106cedb61d8cf820a827b25d3bc2fca1f0bf76d5082b3474cd78f11be2247a
MD5 7c25513f03b2d1efa7eb4e0998de6426
BLAKE2b-256 9803315ab5af6aa0d13c009761b39caa6f97d64eb8bbb45df56e883965bca0b1

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