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

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.3
File Size Uploaded Provenance
muxws-0.4.3.tar.gz 91.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 170.6 kB

Release files / muxws-0.4.3.tar.gz

Download URL muxws-0.4.3.tar.gz
Size 91.5 kB
Tags Source
SHA-256 checksum
How to use checksums
01c9e86e67f3fcc121b1881f8756ec1f709185b5a100211672bf2731215fa770
BLAKE2b-256 checksum
How to use checksums
2f10f58c659a3da6c4cc54f3a66af76e530b8532c2c1467f2d7a601519b5d514
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.3-py3-none-any.whl

Download URL muxws-0.4.3-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a811330f9c23f9a2265c0667f9712add4b9de7a8381a6195a61de59f9b768c9
BLAKE2b-256 checksum
How to use checksums
ef5e0ddde22d06912229754cb0091e34ffaf0be55fb96baf6a663da552795d26
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.3

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