Swarmauri Tool Jupyter Execute & Convert
Executes a Jupyter notebook and converts the output to HTML or PDF using nbconvert—packaged as a Swarmauri tool.
Features
- Runs notebooks with configurable execution timeout.
- Converts executed notebooks to
htmlorpdfvia nbconvert. - Returns a status dictionary with the converted file path or error details.
Prerequisites
- Python 3.10 or newer.
nbconvert,nbformat, and Jupyter runtime (installed automatically).- Notebook dependencies must be available in the execution environment.
Installation
# pip
pip install swarmauri_tool_jupyterexecuteandconvert
# poetry
poetry add swarmauri_tool_jupyterexecuteandconvert
# uv (pyproject-based projects)
uv add swarmauri_tool_jupyterexecuteandconvert
Quickstart
from swarmauri_tool_jupyterexecuteandconvert import JupyterExecuteAndConvertTool
tool = JupyterExecuteAndConvertTool()
response = tool(
notebook_path="notebooks/analysis.ipynb",
output_format="pdf",
execution_timeout=600,
)
if response.get("status") == "success":
print("Converted file:", response["converted_file"])
else:
print("Error:", response.get("error"))
print("Message:", response.get("message"))
Tips
- Set
execution_timeouthigh enough for long-running notebooks; nbconvert defaults to 600 seconds. - Ensure notebooks run headlessly: avoid widgets or interactive inputs that pause execution.
- Install LaTeX (
tectonic,texlive) if exporting to PDF on systems where nbconvert requires it. - Combine with
JupyterClearOutputToolto strip outputs after conversion if you want clean notebooks and rich artifacts.
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_jupyterexecuteandconvert 0.10.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_jupyterexecuteandconvert-0.10.0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmauri_tool_jupyterexecuteandconvert-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / swarmauri_tool_jupyterexecuteandconvert-0.10.0.tar.gz
| Download URL | swarmauri_tool_jupyterexecuteandconvert-0.10.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9a0d384b2defc5f75891038440d662d120d8ab1bb457725dbea585f2a51cc81
|
|
BLAKE2b-256 checksum How to use checksums |
c44a60293a97103a823f3c1331286ade589c8e28321a26c61589422cf345edba
|
| 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_jupyterexecuteandconvert-0.10.0-py3-none-any.whl
| Download URL | swarmauri_tool_jupyterexecuteandconvert-0.10.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c144463758f8ee4480ccfc2e436c79e0999e1b3ff0474a342abbb8bd3248bdf4
|
|
BLAKE2b-256 checksum How to use checksums |
4fb44dd6026b8c88cd2260b2ba73568e3a1548ad57cf884af279887ffad0d25b
|
| 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}
|