Skip to main content

muxws

Multiplexed streams over one WebSocket, with HTTP/2 and HTTP/3 stream semantics. muxws carries many independent, cancellable, bidirectional streams on one socket; either end can open a stream. It needs no QUIC or HTTP/3 stack. muxws is defined by its wire format. Python and TypeScript implementations are in this repository; SPEC.md and conformance/ specify the protocol for further implementations.

muxws copies the stream semantics of HTTP/2 and HTTP/3, not their transport. A connection runs over one TCP socket or one Unix domain socket, so all streams share one global message order and there is no per-stream loss recovery. Rationale lists which parts of the HTTP model muxws copies and which it does not; Comparison compares the two protocols frame by frame. muxws does not route requests, serialize domain objects, authenticate peers, store messages durably or define RPC services.

Install

pip install muxws                       # extras: [starlette], [websockets], [msgpack]
npm install muxws                       # optional peers: ws, @msgpack/msgpack

Documentation

The manual is at docs.velis.si/muxws. npm run docs:dev builds and serves it locally.

A server and a client in three files Getting started
A browser demo, a Unix-socket demo and a throughput benchmark Demos
Every public symbol in both languages API reference
The normative rules and the conformance fixtures for new implementations SPEC.md, conformance/
Changes per release, and the changes required when upgrading Changelog, Migration guide

Demo

Open in GitHub Codespaces

Run locally

Requirements: uv, Node 22+.

git clone https://github.com/velis74/muxws.git && cd muxws
uv sync
npm ci
uv run python demo.py --browser    # then open http://127.0.0.1:5173

Status

Alpha. The wire protocol and the packages are versioned independently:

  • Wire protocol: generation 1, frozen. The WebSocket subprotocol is muxws.v1.<codec>. The v1 changes only with a breaking wire change.
  • Packages: version 0.x. Version 1.0 follows the first confirmed production deployment.

Packages: muxws on PyPI; muxws on npm, with the browser entry point and the muxws/node and muxws/msgpack subpaths.

Licence

MIT. Copyright © 2025 Jure Erznožnik.

Metadata

Release files for muxws 0.4.5

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

Source distribution (sdist)

Source distribution for muxws 0.4.5
File Size Uploaded Provenance Actions
muxws-0.4.5.tar.gz 97.8 kB Without provenance Details for muxws-0.4.5.tar.gz

Built distribution (wheel)

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

Total release size: 177.9 kB

Release files / muxws-0.4.5.tar.gz

Download URL muxws-0.4.5.tar.gz
Size 97.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0af9b3dc14a7f2407de73841770c1974d60f951817122f23395c5985ae9bb528
BLAKE2b-256 checksum
How to use checksums
364afc86ae01e391e047da910629f24d03e0115cb37f42716a273610b28f1775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / muxws-0.4.5-py3-none-any.whl

Download URL muxws-0.4.5-py3-none-any.whl
Size 80.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6481b6fee1667e43bceb174218e8fca4240d5f128d685f4f943e904994db03b0
BLAKE2b-256 checksum
How to use checksums
7d53040609a31008282c1652f3ffbf2cc98a69a577a308ffc8f7ebbb5358b1c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for muxws 0.4.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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