swarmauri_toolkit_jupytertoolkit 0.3.0.dev4__tar.gz → 0.3.2.dev6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- swarmauri_toolkit_jupytertoolkit-0.3.2.dev6/PKG-INFO +210 -0
- swarmauri_toolkit_jupytertoolkit-0.3.2.dev6/README.md +164 -0
- {swarmauri_toolkit_jupytertoolkit-0.3.0.dev4 → swarmauri_toolkit_jupytertoolkit-0.3.2.dev6}/pyproject.toml +16 -1
- swarmauri_toolkit_jupytertoolkit-0.3.0.dev4/PKG-INFO +0 -121
- swarmauri_toolkit_jupytertoolkit-0.3.0.dev4/README.md +0 -81
- {swarmauri_toolkit_jupytertoolkit-0.3.0.dev4 → swarmauri_toolkit_jupytertoolkit-0.3.2.dev6}/LICENSE +0 -0
- {swarmauri_toolkit_jupytertoolkit-0.3.0.dev4 → swarmauri_toolkit_jupytertoolkit-0.3.2.dev6}/swarmauri_toolkit_jupytertoolkit/JupyterToolkit.py +0 -0
- {swarmauri_toolkit_jupytertoolkit-0.3.0.dev4 → swarmauri_toolkit_jupytertoolkit-0.3.2.dev6}/swarmauri_toolkit_jupytertoolkit/__init__.py +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_toolkit_jupytertoolkit
|
|
3
|
+
Version: 0.3.2.dev6
|
|
4
|
+
Summary: A unified toolkit for aggregating standalone jupyter notebook tools.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: swarmauri,toolkit,jupytertoolkit,unified,aggregating,standalone,jupyter,notebook,tools
|
|
8
|
+
Author: Jacob Stewart
|
|
9
|
+
Author-email: jacob@swarmauri.com
|
|
10
|
+
Requires-Python: >=3.10,<3.13
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Natural Language :: English
|
|
17
|
+
Classifier: Development Status :: 3 - Alpha
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
20
|
+
Requires-Dist: pydantic
|
|
21
|
+
Requires-Dist: swarmauri_base
|
|
22
|
+
Requires-Dist: swarmauri_core
|
|
23
|
+
Requires-Dist: swarmauri_standard
|
|
24
|
+
Requires-Dist: swarmauri_tool_jupyterclearoutput
|
|
25
|
+
Requires-Dist: swarmauri_tool_jupyterdisplay
|
|
26
|
+
Requires-Dist: swarmauri_tool_jupyterdisplayhtml
|
|
27
|
+
Requires-Dist: swarmauri_tool_jupyterexecuteandconvert
|
|
28
|
+
Requires-Dist: swarmauri_tool_jupyterexecutecell
|
|
29
|
+
Requires-Dist: swarmauri_tool_jupyterexecutenotebook
|
|
30
|
+
Requires-Dist: swarmauri_tool_jupyterexecutenotebookwithparameters
|
|
31
|
+
Requires-Dist: swarmauri_tool_jupyterexporthtml
|
|
32
|
+
Requires-Dist: swarmauri_tool_jupyterexportlatex
|
|
33
|
+
Requires-Dist: swarmauri_tool_jupyterexportmarkdown
|
|
34
|
+
Requires-Dist: swarmauri_tool_jupyterexportpython
|
|
35
|
+
Requires-Dist: swarmauri_tool_jupyterfromdict
|
|
36
|
+
Requires-Dist: swarmauri_tool_jupytergetiopubmessage
|
|
37
|
+
Requires-Dist: swarmauri_tool_jupytergetshellmessage
|
|
38
|
+
Requires-Dist: swarmauri_tool_jupyterreadnotebook
|
|
39
|
+
Requires-Dist: swarmauri_tool_jupyterruncell
|
|
40
|
+
Requires-Dist: swarmauri_tool_jupytershutdownkernel
|
|
41
|
+
Requires-Dist: swarmauri_tool_jupyterstartkernel
|
|
42
|
+
Requires-Dist: swarmauri_tool_jupytervalidatenotebook
|
|
43
|
+
Requires-Dist: swarmauri_tool_jupyterwritenotebook
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
50
|
+
<img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Downloads"/></a>
|
|
51
|
+
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit/">
|
|
52
|
+
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit.svg"/></a>
|
|
53
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
54
|
+
<img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Python Version"/></a>
|
|
55
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
56
|
+
<img src="https://img.shields.io/pypi/l/swarmauri_toolkit_jupytertoolkit" alt="PyPI - License"/></a>
|
|
57
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
58
|
+
<img src="https://img.shields.io/pypi/v/swarmauri_toolkit_jupytertoolkit?label=swarmauri_toolkit_jupytertoolkit&color=green" alt="PyPI - swarmauri_toolkit_jupytertoolkit"/></a>
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
# Swarmauri Toolkit · Jupyter Toolkit
|
|
64
|
+
|
|
65
|
+
A one-stop Swarmauri toolkit that bundles the Jupyter kernel, execution, export, and validation tools under a single interface. Instantiate `JupyterToolkit` and you instantly gain access to twenty standalone tools covering notebook lifecycle tasks: launching kernels, running cells, converting notebooks, exporting formats, and more.
|
|
66
|
+
|
|
67
|
+
- Pre-registers commonly used Jupyter utilities such as `JupyterStartKernelTool`, `JupyterExecuteNotebookTool`, `JupyterExportHtmlTool`, and `JupyterShutdownKernelTool`.
|
|
68
|
+
- Ensures each tool shares the same Swarmauri component metadata so agents can discover capabilities automatically.
|
|
69
|
+
- Useful for agents, pipelines, or CLI scripts that need rich notebook automation without manually wiring every tool.
|
|
70
|
+
|
|
71
|
+
## Requirements
|
|
72
|
+
|
|
73
|
+
- Python 3.10 – 3.13.
|
|
74
|
+
- The underlying Jupyter tool packages (installed automatically as dependencies).
|
|
75
|
+
- Access to a local or remote Jupyter runtime for kernel operations.
|
|
76
|
+
|
|
77
|
+
## Installation
|
|
78
|
+
|
|
79
|
+
Pick the package manager that fits your project; each command installs the toolkit plus all underlying Jupyter tools.
|
|
80
|
+
|
|
81
|
+
**pip**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pip install swarmauri_toolkit_jupytertoolkit
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Poetry**
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
poetry add swarmauri_toolkit_jupytertoolkit
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**uv**
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Add to the current project and update uv.lock
|
|
97
|
+
uv add swarmauri_toolkit_jupytertoolkit
|
|
98
|
+
|
|
99
|
+
# or install into the active environment without modifying pyproject.toml
|
|
100
|
+
uv pip install swarmauri_toolkit_jupytertoolkit
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
> Tip: Some tools depend on Jupyter client libraries (`jupyter_client`, `nbformat`, `nbconvert`). Make sure your environment includes any system packages required by those libraries (for example LaTeX when exporting to PDF/LaTeX).
|
|
104
|
+
|
|
105
|
+
## Quick Start
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
109
|
+
|
|
110
|
+
toolkit = JupyterToolkit()
|
|
111
|
+
|
|
112
|
+
# Start a kernel and execute a notebook
|
|
113
|
+
start = toolkit.tools["JupyterStartKernelTool"]()
|
|
114
|
+
print(start)
|
|
115
|
+
|
|
116
|
+
run = toolkit.tools["JupyterExecuteNotebookTool"](
|
|
117
|
+
notebook_path="reports/daily.ipynb",
|
|
118
|
+
timeout=120
|
|
119
|
+
)
|
|
120
|
+
print(run)
|
|
121
|
+
|
|
122
|
+
# Export the executed notebook to HTML
|
|
123
|
+
export = toolkit.tools["JupyterExportHtmlTool"](
|
|
124
|
+
notebook_path="reports/daily.ipynb",
|
|
125
|
+
output_path="reports/daily.html"
|
|
126
|
+
)
|
|
127
|
+
print(export)
|
|
128
|
+
|
|
129
|
+
# Gracefully shut down the kernel
|
|
130
|
+
shutdown = toolkit.tools["JupyterShutdownKernelTool"](
|
|
131
|
+
kernel_id=start["kernel_id"],
|
|
132
|
+
shutdown_timeout=10
|
|
133
|
+
)
|
|
134
|
+
print(shutdown)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`JupyterToolkit.tools` is a dictionary keyed by tool name. Each entry is the ready-to-call Swarmauri tool instance.
|
|
138
|
+
|
|
139
|
+
## Usage Scenarios
|
|
140
|
+
|
|
141
|
+
### Build a Notebook Orchestration Service
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from fastapi import FastAPI, BackgroundTasks
|
|
145
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
146
|
+
|
|
147
|
+
app = FastAPI()
|
|
148
|
+
toolkit = JupyterToolkit()
|
|
149
|
+
|
|
150
|
+
@app.post("/execute")
|
|
151
|
+
def execute(data: dict, background: BackgroundTasks):
|
|
152
|
+
nb_path = data["notebook_path"]
|
|
153
|
+
background.add_task(
|
|
154
|
+
toolkit.tools["JupyterExecuteNotebookWithParametersTool"],
|
|
155
|
+
notebook_path=nb_path,
|
|
156
|
+
parameters=data.get("parameters", {})
|
|
157
|
+
)
|
|
158
|
+
return {"status": "queued", "notebook": nb_path}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Trigger parameterized notebook runs via HTTP and reuse the toolkit’s pre-wired execution tool.
|
|
162
|
+
|
|
163
|
+
### Enhance a Swarmauri Agent With Notebook Skills
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
from swarmauri_core.agent.Agent import Agent
|
|
167
|
+
from swarmauri_core.messages.HumanMessage import HumanMessage
|
|
168
|
+
from swarmauri_standard.tools.registry import ToolRegistry
|
|
169
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
170
|
+
|
|
171
|
+
jupyter_toolkit = JupyterToolkit()
|
|
172
|
+
registry = ToolRegistry()
|
|
173
|
+
registry.register(jupyter_toolkit.tools["JupyterExecuteCellTool"])
|
|
174
|
+
registry.register(jupyter_toolkit.tools["JupyterReadNotebookTool"])
|
|
175
|
+
registry.register(jupyter_toolkit.tools["JupyterWriteNotebookTool"])
|
|
176
|
+
|
|
177
|
+
agent = Agent(tool_registry=registry)
|
|
178
|
+
response = agent.run(HumanMessage(content="Execute cell 3 from analytics.ipynb"))
|
|
179
|
+
print(response)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Combine multiple notebook operations so the agent can read, modify, and execute notebooks within a single conversation.
|
|
183
|
+
|
|
184
|
+
### Convert Notebooks in Bulk
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
from pathlib import Path
|
|
188
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
189
|
+
|
|
190
|
+
toolkit = JupyterToolkit()
|
|
191
|
+
export_html = toolkit.tools["JupyterExportHtmlTool"]
|
|
192
|
+
export_md = toolkit.tools["JupyterExportMarkdownTool"]
|
|
193
|
+
|
|
194
|
+
for notebook in Path("notebooks").glob("*.ipynb"):
|
|
195
|
+
export_html(notebook_path=str(notebook), output_path=str(notebook.with_suffix(".html")))
|
|
196
|
+
export_md(notebook_path=str(notebook), output_path=str(notebook.with_suffix(".md")))
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Run multiple exporters without manually instantiating each tool.
|
|
200
|
+
|
|
201
|
+
## Troubleshooting
|
|
202
|
+
|
|
203
|
+
- **Kernel start failures** – Ensure the environment has a working Jupyter kernelspec (e.g., `python3`). Check permissions when running inside containers or restricted hosts.
|
|
204
|
+
- **Export errors** – Some exporters (LaTeX/PDF) require external dependencies. Install TeX Live or pandoc as appropriate.
|
|
205
|
+
- **Tool lookup mistakes** – Use `toolkit.tools.keys()` to inspect available tool names; they map 1:1 to the underlying packages (`JupyterExecuteNotebookTool`, `JupyterValidateNotebookTool`, etc.).
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
`swarmauri_toolkit_jupytertoolkit` is released under the Apache 2.0 License. See `LICENSE` for details.
|
|
210
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
5
|
+
<img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Downloads"/></a>
|
|
6
|
+
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit/">
|
|
7
|
+
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit.svg"/></a>
|
|
8
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
9
|
+
<img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Python Version"/></a>
|
|
10
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
11
|
+
<img src="https://img.shields.io/pypi/l/swarmauri_toolkit_jupytertoolkit" alt="PyPI - License"/></a>
|
|
12
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
13
|
+
<img src="https://img.shields.io/pypi/v/swarmauri_toolkit_jupytertoolkit?label=swarmauri_toolkit_jupytertoolkit&color=green" alt="PyPI - swarmauri_toolkit_jupytertoolkit"/></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Swarmauri Toolkit · Jupyter Toolkit
|
|
19
|
+
|
|
20
|
+
A one-stop Swarmauri toolkit that bundles the Jupyter kernel, execution, export, and validation tools under a single interface. Instantiate `JupyterToolkit` and you instantly gain access to twenty standalone tools covering notebook lifecycle tasks: launching kernels, running cells, converting notebooks, exporting formats, and more.
|
|
21
|
+
|
|
22
|
+
- Pre-registers commonly used Jupyter utilities such as `JupyterStartKernelTool`, `JupyterExecuteNotebookTool`, `JupyterExportHtmlTool`, and `JupyterShutdownKernelTool`.
|
|
23
|
+
- Ensures each tool shares the same Swarmauri component metadata so agents can discover capabilities automatically.
|
|
24
|
+
- Useful for agents, pipelines, or CLI scripts that need rich notebook automation without manually wiring every tool.
|
|
25
|
+
|
|
26
|
+
## Requirements
|
|
27
|
+
|
|
28
|
+
- Python 3.10 – 3.13.
|
|
29
|
+
- The underlying Jupyter tool packages (installed automatically as dependencies).
|
|
30
|
+
- Access to a local or remote Jupyter runtime for kernel operations.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
Pick the package manager that fits your project; each command installs the toolkit plus all underlying Jupyter tools.
|
|
35
|
+
|
|
36
|
+
**pip**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install swarmauri_toolkit_jupytertoolkit
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Poetry**
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
poetry add swarmauri_toolkit_jupytertoolkit
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**uv**
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Add to the current project and update uv.lock
|
|
52
|
+
uv add swarmauri_toolkit_jupytertoolkit
|
|
53
|
+
|
|
54
|
+
# or install into the active environment without modifying pyproject.toml
|
|
55
|
+
uv pip install swarmauri_toolkit_jupytertoolkit
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
> Tip: Some tools depend on Jupyter client libraries (`jupyter_client`, `nbformat`, `nbconvert`). Make sure your environment includes any system packages required by those libraries (for example LaTeX when exporting to PDF/LaTeX).
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
64
|
+
|
|
65
|
+
toolkit = JupyterToolkit()
|
|
66
|
+
|
|
67
|
+
# Start a kernel and execute a notebook
|
|
68
|
+
start = toolkit.tools["JupyterStartKernelTool"]()
|
|
69
|
+
print(start)
|
|
70
|
+
|
|
71
|
+
run = toolkit.tools["JupyterExecuteNotebookTool"](
|
|
72
|
+
notebook_path="reports/daily.ipynb",
|
|
73
|
+
timeout=120
|
|
74
|
+
)
|
|
75
|
+
print(run)
|
|
76
|
+
|
|
77
|
+
# Export the executed notebook to HTML
|
|
78
|
+
export = toolkit.tools["JupyterExportHtmlTool"](
|
|
79
|
+
notebook_path="reports/daily.ipynb",
|
|
80
|
+
output_path="reports/daily.html"
|
|
81
|
+
)
|
|
82
|
+
print(export)
|
|
83
|
+
|
|
84
|
+
# Gracefully shut down the kernel
|
|
85
|
+
shutdown = toolkit.tools["JupyterShutdownKernelTool"](
|
|
86
|
+
kernel_id=start["kernel_id"],
|
|
87
|
+
shutdown_timeout=10
|
|
88
|
+
)
|
|
89
|
+
print(shutdown)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`JupyterToolkit.tools` is a dictionary keyed by tool name. Each entry is the ready-to-call Swarmauri tool instance.
|
|
93
|
+
|
|
94
|
+
## Usage Scenarios
|
|
95
|
+
|
|
96
|
+
### Build a Notebook Orchestration Service
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from fastapi import FastAPI, BackgroundTasks
|
|
100
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
101
|
+
|
|
102
|
+
app = FastAPI()
|
|
103
|
+
toolkit = JupyterToolkit()
|
|
104
|
+
|
|
105
|
+
@app.post("/execute")
|
|
106
|
+
def execute(data: dict, background: BackgroundTasks):
|
|
107
|
+
nb_path = data["notebook_path"]
|
|
108
|
+
background.add_task(
|
|
109
|
+
toolkit.tools["JupyterExecuteNotebookWithParametersTool"],
|
|
110
|
+
notebook_path=nb_path,
|
|
111
|
+
parameters=data.get("parameters", {})
|
|
112
|
+
)
|
|
113
|
+
return {"status": "queued", "notebook": nb_path}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Trigger parameterized notebook runs via HTTP and reuse the toolkit’s pre-wired execution tool.
|
|
117
|
+
|
|
118
|
+
### Enhance a Swarmauri Agent With Notebook Skills
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from swarmauri_core.agent.Agent import Agent
|
|
122
|
+
from swarmauri_core.messages.HumanMessage import HumanMessage
|
|
123
|
+
from swarmauri_standard.tools.registry import ToolRegistry
|
|
124
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
125
|
+
|
|
126
|
+
jupyter_toolkit = JupyterToolkit()
|
|
127
|
+
registry = ToolRegistry()
|
|
128
|
+
registry.register(jupyter_toolkit.tools["JupyterExecuteCellTool"])
|
|
129
|
+
registry.register(jupyter_toolkit.tools["JupyterReadNotebookTool"])
|
|
130
|
+
registry.register(jupyter_toolkit.tools["JupyterWriteNotebookTool"])
|
|
131
|
+
|
|
132
|
+
agent = Agent(tool_registry=registry)
|
|
133
|
+
response = agent.run(HumanMessage(content="Execute cell 3 from analytics.ipynb"))
|
|
134
|
+
print(response)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Combine multiple notebook operations so the agent can read, modify, and execute notebooks within a single conversation.
|
|
138
|
+
|
|
139
|
+
### Convert Notebooks in Bulk
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
from pathlib import Path
|
|
143
|
+
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
144
|
+
|
|
145
|
+
toolkit = JupyterToolkit()
|
|
146
|
+
export_html = toolkit.tools["JupyterExportHtmlTool"]
|
|
147
|
+
export_md = toolkit.tools["JupyterExportMarkdownTool"]
|
|
148
|
+
|
|
149
|
+
for notebook in Path("notebooks").glob("*.ipynb"):
|
|
150
|
+
export_html(notebook_path=str(notebook), output_path=str(notebook.with_suffix(".html")))
|
|
151
|
+
export_md(notebook_path=str(notebook), output_path=str(notebook.with_suffix(".md")))
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Run multiple exporters without manually instantiating each tool.
|
|
155
|
+
|
|
156
|
+
## Troubleshooting
|
|
157
|
+
|
|
158
|
+
- **Kernel start failures** – Ensure the environment has a working Jupyter kernelspec (e.g., `python3`). Check permissions when running inside containers or restricted hosts.
|
|
159
|
+
- **Export errors** – Some exporters (LaTeX/PDF) require external dependencies. Install TeX Live or pandoc as appropriate.
|
|
160
|
+
- **Tool lookup mistakes** – Use `toolkit.tools.keys()` to inspect available tool names; they map 1:1 to the underlying packages (`JupyterExecuteNotebookTool`, `JupyterValidateNotebookTool`, etc.).
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
`swarmauri_toolkit_jupytertoolkit` is released under the Apache 2.0 License. See `LICENSE` for details.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "swarmauri_toolkit_jupytertoolkit"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.2.dev6"
|
|
4
4
|
description = "A unified toolkit for aggregating standalone jupyter notebook tools."
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
readme = "README.md"
|
|
@@ -12,6 +12,10 @@ classifiers = [
|
|
|
12
12
|
"Programming Language :: Python :: 3.11",
|
|
13
13
|
"Programming Language :: Python :: 3.12",
|
|
14
14
|
"Programming Language :: Python :: 3.13",
|
|
15
|
+
"Natural Language :: English",
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
15
19
|
]
|
|
16
20
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
17
21
|
dependencies = [
|
|
@@ -40,6 +44,17 @@ dependencies = [
|
|
|
40
44
|
"swarmauri_tool_jupytervalidatenotebook",
|
|
41
45
|
"swarmauri_tool_jupyterwritenotebook",
|
|
42
46
|
]
|
|
47
|
+
keywords = [
|
|
48
|
+
"swarmauri",
|
|
49
|
+
"toolkit",
|
|
50
|
+
"jupytertoolkit",
|
|
51
|
+
"unified",
|
|
52
|
+
"aggregating",
|
|
53
|
+
"standalone",
|
|
54
|
+
"jupyter",
|
|
55
|
+
"notebook",
|
|
56
|
+
"tools",
|
|
57
|
+
]
|
|
43
58
|
|
|
44
59
|
[tool.uv.sources]
|
|
45
60
|
swarmauri_core = { workspace = true }
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: swarmauri_toolkit_jupytertoolkit
|
|
3
|
-
Version: 0.3.0.dev4
|
|
4
|
-
Summary: A unified toolkit for aggregating standalone jupyter notebook tools.
|
|
5
|
-
License: Apache-2.0
|
|
6
|
-
Author: Jacob Stewart
|
|
7
|
-
Author-email: jacob@swarmauri.com
|
|
8
|
-
Requires-Python: >=3.10,<3.13
|
|
9
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
-
Requires-Dist: pydantic
|
|
15
|
-
Requires-Dist: swarmauri_base
|
|
16
|
-
Requires-Dist: swarmauri_core
|
|
17
|
-
Requires-Dist: swarmauri_standard
|
|
18
|
-
Requires-Dist: swarmauri_tool_jupyterclearoutput
|
|
19
|
-
Requires-Dist: swarmauri_tool_jupyterdisplay
|
|
20
|
-
Requires-Dist: swarmauri_tool_jupyterdisplayhtml
|
|
21
|
-
Requires-Dist: swarmauri_tool_jupyterexecuteandconvert
|
|
22
|
-
Requires-Dist: swarmauri_tool_jupyterexecutecell
|
|
23
|
-
Requires-Dist: swarmauri_tool_jupyterexecutenotebook
|
|
24
|
-
Requires-Dist: swarmauri_tool_jupyterexecutenotebookwithparameters
|
|
25
|
-
Requires-Dist: swarmauri_tool_jupyterexporthtml
|
|
26
|
-
Requires-Dist: swarmauri_tool_jupyterexportlatex
|
|
27
|
-
Requires-Dist: swarmauri_tool_jupyterexportmarkdown
|
|
28
|
-
Requires-Dist: swarmauri_tool_jupyterexportpython
|
|
29
|
-
Requires-Dist: swarmauri_tool_jupyterfromdict
|
|
30
|
-
Requires-Dist: swarmauri_tool_jupytergetiopubmessage
|
|
31
|
-
Requires-Dist: swarmauri_tool_jupytergetshellmessage
|
|
32
|
-
Requires-Dist: swarmauri_tool_jupyterreadnotebook
|
|
33
|
-
Requires-Dist: swarmauri_tool_jupyterruncell
|
|
34
|
-
Requires-Dist: swarmauri_tool_jupytershutdownkernel
|
|
35
|
-
Requires-Dist: swarmauri_tool_jupyterstartkernel
|
|
36
|
-
Requires-Dist: swarmauri_tool_jupytervalidatenotebook
|
|
37
|
-
Requires-Dist: swarmauri_tool_jupyterwritenotebook
|
|
38
|
-
Description-Content-Type: text/markdown
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-

|
|
42
|
-
|
|
43
|
-
<p align="center">
|
|
44
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
45
|
-
<img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Downloads"/></a>
|
|
46
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit/">
|
|
47
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit.svg"/></a>
|
|
48
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
49
|
-
<img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Python Version"/></a>
|
|
50
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
51
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_toolkit_jupytertoolkit" alt="PyPI - License"/></a>
|
|
52
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
53
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_toolkit_jupytertoolkit?label=swarmauri_toolkit_jupytertoolkit&color=green" alt="PyPI - swarmauri_toolkit_jupytertoolkit"/></a>
|
|
54
|
-
</p>
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
# Swarmauri Toolkit Jupytertoolkit
|
|
59
|
-
|
|
60
|
-
A unified toolkit for aggregating standalone jupyter notebook tools.
|
|
61
|
-
|
|
62
|
-
## Installation
|
|
63
|
-
|
|
64
|
-
To install `swarmauri_toolkit_jupytertoolkit`, run the following command:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pip install swarmauri_toolkit_jupytertoolkit
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Usage
|
|
71
|
-
|
|
72
|
-
To use `swarmauri_toolkit_jupytertoolkit`, you can import it into your Python script or Jupyter Notebook:
|
|
73
|
-
|
|
74
|
-
```python
|
|
75
|
-
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
You can then create an instance of the `JupyterToolkit` class:
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
toolkit = JupyterToolkit()
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
The `JupyterToolkit` class provides a centralized management system for all integrated tools. You can add and remove tools from the toolkit using the `add_tool` and `remove_tool` methods:
|
|
85
|
-
|
|
86
|
-
```python
|
|
87
|
-
toolkit.add_tool("JupyterClearOutputTool")
|
|
88
|
-
toolkit.remove_tool("JupyterClearOutputTool")
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
You can also configure and customize tool settings using the `configure_tool` method:
|
|
92
|
-
|
|
93
|
-
```python
|
|
94
|
-
toolkit.configure_tool("JupyterClearOutputTool", {"option": "value"})
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
The `JupyterToolkit` class also provides an intuitive and user-friendly interface for accessing and using integrated tools. You can access the interface by calling the `display` method:
|
|
98
|
-
|
|
99
|
-
```python
|
|
100
|
-
toolkit.display()
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
This will display the toolkit interface in the Jupyter Notebook.
|
|
104
|
-
|
|
105
|
-
## Contributing
|
|
106
|
-
|
|
107
|
-
To contribute to `swarmauri_toolkit_jupytertoolkit`, please fork the repository and submit a pull request. Please ensure that your contributions adhere to the project's coding standards and guidelines.
|
|
108
|
-
|
|
109
|
-
## License
|
|
110
|
-
|
|
111
|
-
`swarmauri_toolkit_jupytertoolkit` is licensed under the Apache License 2.0. Please see the LICENSE file for more information.
|
|
112
|
-
|
|
113
|
-
## Authors
|
|
114
|
-
|
|
115
|
-
* Jacob Stewart <jacob@swarmauri.com>
|
|
116
|
-
|
|
117
|
-
## Acknowledgments
|
|
118
|
-
|
|
119
|
-
* The `swarmauri_toolkit_jupytertoolkit` project was made possible by the contributions of the Swarmauri community.
|
|
120
|
-
* The project is built on top of the Jupyter Notebook framework and its dependencies.
|
|
121
|
-
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-

|
|
3
|
-
|
|
4
|
-
<p align="center">
|
|
5
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
6
|
-
<img src="https://img.shields.io/pypi/dm/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Downloads"/></a>
|
|
7
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit/">
|
|
8
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_toolkit_jupytertoolkit.svg"/></a>
|
|
9
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
10
|
-
<img src="https://img.shields.io/pypi/pyversions/swarmauri_toolkit_jupytertoolkit" alt="PyPI - Python Version"/></a>
|
|
11
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
12
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_toolkit_jupytertoolkit" alt="PyPI - License"/></a>
|
|
13
|
-
<a href="https://pypi.org/project/swarmauri_toolkit_jupytertoolkit/">
|
|
14
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_toolkit_jupytertoolkit?label=swarmauri_toolkit_jupytertoolkit&color=green" alt="PyPI - swarmauri_toolkit_jupytertoolkit"/></a>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Swarmauri Toolkit Jupytertoolkit
|
|
20
|
-
|
|
21
|
-
A unified toolkit for aggregating standalone jupyter notebook tools.
|
|
22
|
-
|
|
23
|
-
## Installation
|
|
24
|
-
|
|
25
|
-
To install `swarmauri_toolkit_jupytertoolkit`, run the following command:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pip install swarmauri_toolkit_jupytertoolkit
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Usage
|
|
32
|
-
|
|
33
|
-
To use `swarmauri_toolkit_jupytertoolkit`, you can import it into your Python script or Jupyter Notebook:
|
|
34
|
-
|
|
35
|
-
```python
|
|
36
|
-
from swarmauri_toolkit_jupytertoolkit import JupyterToolkit
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
You can then create an instance of the `JupyterToolkit` class:
|
|
40
|
-
|
|
41
|
-
```python
|
|
42
|
-
toolkit = JupyterToolkit()
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The `JupyterToolkit` class provides a centralized management system for all integrated tools. You can add and remove tools from the toolkit using the `add_tool` and `remove_tool` methods:
|
|
46
|
-
|
|
47
|
-
```python
|
|
48
|
-
toolkit.add_tool("JupyterClearOutputTool")
|
|
49
|
-
toolkit.remove_tool("JupyterClearOutputTool")
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
You can also configure and customize tool settings using the `configure_tool` method:
|
|
53
|
-
|
|
54
|
-
```python
|
|
55
|
-
toolkit.configure_tool("JupyterClearOutputTool", {"option": "value"})
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
The `JupyterToolkit` class also provides an intuitive and user-friendly interface for accessing and using integrated tools. You can access the interface by calling the `display` method:
|
|
59
|
-
|
|
60
|
-
```python
|
|
61
|
-
toolkit.display()
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
This will display the toolkit interface in the Jupyter Notebook.
|
|
65
|
-
|
|
66
|
-
## Contributing
|
|
67
|
-
|
|
68
|
-
To contribute to `swarmauri_toolkit_jupytertoolkit`, please fork the repository and submit a pull request. Please ensure that your contributions adhere to the project's coding standards and guidelines.
|
|
69
|
-
|
|
70
|
-
## License
|
|
71
|
-
|
|
72
|
-
`swarmauri_toolkit_jupytertoolkit` is licensed under the Apache License 2.0. Please see the LICENSE file for more information.
|
|
73
|
-
|
|
74
|
-
## Authors
|
|
75
|
-
|
|
76
|
-
* Jacob Stewart <jacob@swarmauri.com>
|
|
77
|
-
|
|
78
|
-
## Acknowledgments
|
|
79
|
-
|
|
80
|
-
* The `swarmauri_toolkit_jupytertoolkit` project was made possible by the contributions of the Swarmauri community.
|
|
81
|
-
* The project is built on top of the Jupyter Notebook framework and its dependencies.
|
{swarmauri_toolkit_jupytertoolkit-0.3.0.dev4 → swarmauri_toolkit_jupytertoolkit-0.3.2.dev6}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|