A tool designed to execute parameterized notebooks using papermill, allowing dynamic input and output capture for automated workflows.
Project description
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_notebookon success orerror/messagewhen 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
timeoutfor 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev9.tar.gz.
File metadata
- Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev9.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88e11d6ce6d872fee1428330c70cde8fb02c7848f4d571c1d78aa82d4ba2f374
|
|
| MD5 |
e33677cb710a97f6cd28f5fa576ee456
|
|
| BLAKE2b-256 |
99c473476d17701707f83d4f0afa66c032b37b0357f8c99a515efe0c95166193
|
File details
Details for the file swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev9-py3-none-any.whl.
File metadata
- Download URL: swarmauri_tool_jupyterexecutenotebookwithparameters-1.3.3.dev9-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71625db285704d1a504cda3419786518730f00edb7f63ca0e3b4e113c7b9363b
|
|
| MD5 |
4d5509488dc57458f9f6f74b89871735
|
|
| BLAKE2b-256 |
485d8b1f2c212c0cf5ac5941c2b0325585ae33119075ad88c8899d415d88751f
|