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

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev17.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.3.3.dev17.tar.gz
Algorithm Hash digest
SHA256 877c5be4bc4576ccccf99b14b025fdbbbb97d423183a4384ffc3f8a0f5de7bdb
MD5 2e922ea8fec574ef099e46d2059a7452
BLAKE2b-256 75012f03c7553f10acc7ef6ce14ad4b4db96c6357c6d0f3107bb82b7c2a2042f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev17-py3-none-any.whl
  • Upload date:
  • Size: 9.7 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.3.3.dev17-py3-none-any.whl
Algorithm Hash digest
SHA256 dd503cfa1b86ae7d8870f5da47c03136340179d97533eb97dd27c7669ea4edad
MD5 16f10c85921f6bd1c66948aa35093858
BLAKE2b-256 d2d03148150d51117c13604030f0ceca5e8237ebf08d1049296420aad0f156e2

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