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

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.1
File Size Uploaded Provenance
muxws-0.4.1.tar.gz 87.6 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 162.3 kB

Release files / muxws-0.4.1.tar.gz

Download URL muxws-0.4.1.tar.gz
Size 87.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a6f2103a6c15cce995d021ed63bfb6702cc7819c0024825744d47ae4f549b4f8
BLAKE2b-256 checksum
How to use checksums
b1abb8f3ce376fd7b1e1144584cab8f6145a939510aa1fc3bd22aaf67eb87a76
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.1-py3-none-any.whl

Download URL muxws-0.4.1-py3-none-any.whl
Size 74.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa5ccfab8b23810fe2035581ba739ac9cc1f0bbf883779bf854ebc5c266bb4d2
BLAKE2b-256 checksum
How to use checksums
ba9c904605b6a8c33457cf69cd28d7144c780a7105ecd21cfe0d62c80603891b
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.1

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