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.
Metadata
Release files for swarmauri_tool_jupyterexecutenotebookwithparameters 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.tar.gz
| Download URL | swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad9fa646c9098dd417ad0378e3ff3d17432b16a6964a32425e781334570bd455
|
|
BLAKE2b-256 checksum How to use checksums |
8694740244c15d1ede87f3deaa94de5d8613b937faf08fddc63757248a3667fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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}
|
Release files / swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0-py3-none-any.whl
| Download URL | swarmauri_tool_jupyterexecutenotebookwithparameters-1.4.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bc27c77fa6f15705328ea6feec46badfbfdeccef4c9adc60b261e965ea87246
|
|
BLAKE2b-256 checksum How to use checksums |
41b9bb2483c572f3844cc0397ff41050bc9199e86a92f4089acda88bfec004dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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}
|