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

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.2

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.2
File Size Uploaded Provenance
muxws-0.4.2.tar.gz 90.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 168.1 kB

Release files / muxws-0.4.2.tar.gz

Download URL muxws-0.4.2.tar.gz
Size 90.3 kB
Tags Source
SHA-256 checksum
How to use checksums
39bd8763841f7abf03ffdff4e42ee574bd0aaa13ac11a4594de1f22124408b3a
BLAKE2b-256 checksum
How to use checksums
bdf885f5052db061c6b7e0e239379b1c0c72e4534ba527cf535209f96bd88af0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

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

Download URL muxws-0.4.2-py3-none-any.whl
Size 77.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b05885a74996e3a3412e898be122947c17349d878bcea29f1cd7a46d8964539
BLAKE2b-256 checksum
How to use checksums
fbeb42ce71fee67b02ff0e5f42fb1f3f269fdb714c47d18b85cbdcc21016ead8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Security for muxws 0.4.2

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