Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_transport_wsjsonrpcmux Discord

Swarmauri Transport ? WebSocket JSON-RPC

swarmauri-transport-wsjsonrpcmux provides a JSON-RPC 2.0 dispatcher over WebSockets for browser-friendly agent communication.

Installation

Using uv

uv pip install swarmauri-transport-wsjsonrpcmux --index-url https://pypi.org/simple

Using pip

pip install swarmauri-transport-wsjsonrpcmux

Usage

import asyncio
from swarmauri_transport_wsjsonrpcmux import WsJsonrpcMuxTransport

async def handler(method: str, params):
    if method == "echo":
        return params
    raise ValueError("unknown method")

async def main() -> None:
    transport = WsJsonrpcMuxTransport()
    transport.set_rpc_handler(handler)
    async with transport.server(host="127.0.0.1", port=8765):
        await asyncio.sleep(1)

asyncio.run(main())

Pair the server with a client created via WsJsonrpcMuxTransport().client(...) and call(...) to complete the RPC loop.

Metadata

Release files for swarmauri_transport_wsjsonrpcmux 0.11.0.dev1

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_transport_wsjsonrpcmux 0.11.0.dev1
File Size Uploaded
swarmauri_transport_wsjsonrpcmux-0.11.0.dev1.tar.gz 3.8 kB Details

Built distribution (wheel)

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

Total release size: 8.7 kB

Release files / swarmauri_transport_wsjsonrpcmux-0.11.0.dev1.tar.gz

Download URL swarmauri_transport_wsjsonrpcmux-0.11.0.dev1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
74831310d77f6c3123cd86422f82477d1eedf303b5ffb4558445650e9612dda8
BLAKE2b-256 checksum
How to use checksums
326b0d7f1455b2f7af6194a8dcda6daf7b489c0ebc0bb53c8e3282cb4af54217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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_transport_wsjsonrpcmux-0.11.0.dev1-py3-none-any.whl

Download URL swarmauri_transport_wsjsonrpcmux-0.11.0.dev1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81f4bac071b40bd5e9d62400999b1ec4e1bdbd6891871e96c476bf45299b81e1
BLAKE2b-256 checksum
How to use checksums
86990db9b37bf946c294bd8e4ab08314aa24b0dac328da487e0d1eb735ba3909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
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