Skip to main content

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_tool_jupytergetiopubmessage


Swarmauri Tool Jupyter Get IOPub Message

Listens to a Jupyter kernel’s IOPub channel and collects stdout/stderr/log messages for downstream processing.

Features

  • Connects to /api/kernels/{id}/channels via websocket.
  • Returns a dict containing captured stdout, stderr, logs, execution_results, and a timeout_exceeded flag.
  • Built on jupyter_client with Swarmauri tool registration.

Prerequisites

  • Python 3.10 or newer.
  • jupyter_client, websocket-client installed (pulled automatically).
  • Access to a running Jupyter kernel (e.g., Notebook server).

Installation

# pip
pip install swarmauri_tool_jupytergetiopubmessage

# poetry
poetry add swarmauri_tool_jupytergetiopubmessage

# uv (pyproject-based projects)
uv add swarmauri_tool_jupytergetiopubmessage

Quickstart

from swarmauri_tool_jupytergetiopubmessage import JupyterGetIOPubMessageTool

channels_url = "ws://localhost:8888/api/kernels/<kernel-id>/channels"
result = JupyterGetIOPubMessageTool()(channels_url, timeout=3.0)

print("stdout:", result["stdout"])
print("stderr:", result["stderr"])
print("logs:", result["logs"])
print("timeout?", result["timeout_exceeded"])

Tips

  • Use alongside execution tools to capture live output during automated notebook runs.
  • Ensure your environment handles Jupyter tokens/cookies if the server requires authentication.
  • Increase timeout for longer-running cells to collect all outputs before returning.

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_jupytergetiopubmessage 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_tool_jupytergetiopubmessage 0.9.0
File Size Uploaded
swarmauri_tool_jupytergetiopubmessage-0.9.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_tool_jupytergetiopubmessage 0.9.0
File Interpreter ABI Platform
swarmauri_tool_jupytergetiopubmessage-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.7 kB

Release files / swarmauri_tool_jupytergetiopubmessage-0.9.0.tar.gz

Download URL swarmauri_tool_jupytergetiopubmessage-0.9.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1c7af54b1478e8b973f572628e981c2317ec3da96fb345cb74335ab28999471f
BLAKE2b-256 checksum
How to use checksums
9e51157b9cc553b6e73ac1a709a0f9e9b164969ad4653d6cff94c1bbc16b3a93
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_jupytergetiopubmessage-0.9.0-py3-none-any.whl

Download URL swarmauri_tool_jupytergetiopubmessage-0.9.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d45b1a7d1a61200a1a897a4c9fc20a42f7bf36565bb9d802900b72d1ac377bb
BLAKE2b-256 checksum
How to use checksums
383f9a22f41082328d1d8ab1d6e73a08a596b9db47833b8d69ddfae38e903a1d
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 history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.2

2 release files

0.8.0

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page