Metadata-Version: 2.5
Name: muxws
Version: 0.3.0
Summary: Multiplexed, cancellable, bidirectional streams over one WebSocket - protocol and reference implementation.
Project-URL: Homepage, https://github.com/velis74/muxws
Project-URL: Repository, https://github.com/velis74/muxws
Project-URL: Issues, https://github.com/velis74/muxws/issues
Project-URL: Documentation, https://docs.velis.si/muxws/
Author-email: Jure Erznožnik <jure.erznoznik@gmail.com>
License: MIT
License-File: LICENSE
Keywords: asyncio,multiplexing,streams,websocket
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: demo
Requires-Dist: fastapi; extra == 'demo'
Requires-Dist: uvicorn; extra == 'demo'
Requires-Dist: websockets; extra == 'demo'
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: coverage; extra == 'dev'
Requires-Dist: fastapi; extra == 'dev'
Requires-Dist: httpx2; extra == 'dev'
Requires-Dist: msgpack; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: starlette; extra == 'dev'
Requires-Dist: uvicorn; extra == 'dev'
Requires-Dist: websockets; extra == 'dev'
Provides-Extra: msgpack
Requires-Dist: msgpack>=1.0; extra == 'msgpack'
Provides-Extra: starlette
Requires-Dist: starlette>=0.37; extra == 'starlette'
Provides-Extra: websockets
Requires-Dist: websockets>=12; extra == 'websockets'
Description-Content-Type: text/markdown

# muxws

**HTTP/2 and HTTP/3 stream semantics over a WebSocket.** Many independent, cancellable, bidirectional streams on
one socket, either end able to open one - the model HTTP/2 and HTTP/3 already settled, without needing
QUIC or an HTTP/3 stack. The wire format is the product; Python and TypeScript are the two ports that
exist today, and [`SPEC.md`](https://github.com/velis74/muxws/blob/main/SPEC.md) plus
[`conformance/`](https://github.com/velis74/muxws/blob/main/conformance/README.md) are what a third is
written from.

The mimicry is of *semantics*, not transport: one TCP connection means one global message order and no
per-stream loss recovery - [the rationale](https://docs.velis.si/muxws/guide/rationale) says what is and
is not copied, and [the comparison](https://docs.velis.si/muxws/guide/comparison) accounts for it frame
by frame. muxws is not a router, not a serializer of domain objects, not an authentication mechanism,
not a durable store and not an RPC framework.

## Install

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

## Documentation

**[docs.velis.si/muxws](https://docs.velis.si/muxws/) is the manual** - or build it yourself with
`npm run docs:dev`.

| | |
|---|---|
| Server and client in three files | [Getting started](https://docs.velis.si/muxws/guide/getting-started) |
| Every public symbol, both languages | [API reference](https://docs.velis.si/muxws/api/) |
| The normative rules, and the fixtures a third port is written from | [`SPEC.md`](https://github.com/velis74/muxws/blob/main/SPEC.md), [`conformance/`](https://github.com/velis74/muxws/blob/main/conformance/README.md) |

## Status

Alpha - the first releases. Two versions that move independently: the *wire* is already at its
first generation and frozen there (`muxws.v1.<codec>` is the subprotocol, and `v1` stays until a
breaking change earns a new one), while the *package* carries a leading zero because none of this has
been through a real deployment yet. 1.0 is what the first confirmed production use earns. Python
package `muxws` (PyPI); npm package `muxws`, browser entry plus the `muxws/node` and `muxws/msgpack`
subpaths.

## Licence

MIT. Copyright © 2025 Jure Erznožnik.
