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.3.3.dev3.tar.gz.

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.3.3.dev3.tar.gz
Algorithm Hash digest
SHA256 4f836cc1d6898a336c44f4c954daeb82fddba709b4a260c7fd3ce57a409f8e8e
MD5 61849a834d8f2e30c8811cdcbb3deec1
BLAKE2b-256 41908c735984f58276b662c247fae68a9556d34ca3f95c3118b515f17f93275c

See more details on using hashes here.

File details

Details for the file swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev3-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev3-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.3.3.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 eab0e9a066e316f4529544f624f306624cd9f79a4e2499381b8b19a57bea8dff
MD5 c49cdfc4144d47fef44930e48587f79a
BLAKE2b-256 0a5105c443e734b047ea379b9da4d9255efd04e6c0442967b37d2a212bb11370

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