Swarmauri Tool Jupyter Read Notebook
Reads a .ipynb file from disk into a validated nbformat NotebookNode for downstream processing.
Features
- Wraps nbformat’s
read+ validation workflow in a Swarmauri tool. - Returns
{ "notebook_node": NotebookNode }on success or{ "error": ... }on failure. - Optional
as_versionargument controls notebook parsing version (default 4).
Prerequisites
- Python 3.10 or newer.
- nbformat installed (pulled automatically).
Installation
# pip
pip install swarmauri_tool_jupyterreadnotebook
# poetry
poetry add swarmauri_tool_jupyterreadnotebook
# uv (pyproject-based projects)
uv add swarmauri_tool_jupyterreadnotebook
Quickstart
from swarmauri_tool_jupyterreadnotebook import JupyterReadNotebookTool
reader = JupyterReadNotebookTool()
response = reader(
notebook_file_path="notebooks/example.ipynb",
as_version=4,
)
if "notebook_node" in response:
nb = response["notebook_node"]
print("Cells:", len(nb.cells))
else:
print("Error:", response["error"])
Tips
- Use with execution/export tools to build pipelines (read → execute → convert).
- Handle
errorkey gracefully when files are missing or malformed.
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_jupyterreadnotebook 0.9.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_jupyterreadnotebook-0.9.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmauri_tool_jupyterreadnotebook-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / swarmauri_tool_jupyterreadnotebook-0.9.0.tar.gz
| Download URL | swarmauri_tool_jupyterreadnotebook-0.9.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df0eadf40a1235db06735627664a344664db90b453d3457880b6c72d7bae5a8b
|
|
BLAKE2b-256 checksum How to use checksums |
3a236c6ea6f41a3e19f4766bd98601cae335e596cf9f634597b56ff352011bdd
|
| 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_jupyterreadnotebook-0.9.0-py3-none-any.whl
| Download URL | swarmauri_tool_jupyterreadnotebook-0.9.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0188bd282e66a5ad135acf30a7be5232b9ac3430ffbfb9e4392c013dae422a62
|
|
BLAKE2b-256 checksum How to use checksums |
ba57db3c5e5bf2372b30bb15f88dd4619cb62299333a93d6d092a41472dc5c33
|
| 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}
|