muxws 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- muxws-0.2.0/.gitignore +18 -0
- muxws-0.2.0/LICENSE +21 -0
- muxws-0.2.0/PKG-INFO +92 -0
- muxws-0.2.0/README.md +44 -0
- muxws-0.2.0/conformance/README.md +531 -0
- muxws-0.2.0/conformance/frames/.gitkeep +0 -0
- muxws-0.2.0/conformance/frames/v1-fragment-boundaries.json +251 -0
- muxws-0.2.0/conformance/frames/v1-frames.json +291 -0
- muxws-0.2.0/conformance/invalid/.gitkeep +0 -0
- muxws-0.2.0/conformance/invalid/data-above-high-water-mark.json +28 -0
- muxws-0.2.0/conformance/invalid/data-after-end.json +36 -0
- muxws-0.2.0/conformance/invalid/data-for-closed-id.json +28 -0
- muxws-0.2.0/conformance/invalid/fragment-interrupted-by-non-fragment.json +27 -0
- muxws-0.2.0/conformance/invalid/frame-over-max-frame-bytes.json +23 -0
- muxws-0.2.0/conformance/invalid/open-id-not-monotonic.json +29 -0
- muxws-0.2.0/conformance/invalid/open-wrong-parity.json +21 -0
- muxws-0.2.0/conformance/invalid/undecodable-message.json +16 -0
- muxws-0.2.0/conformance/sequences/.gitkeep +0 -0
- muxws-0.2.0/conformance/sequences/bidirectional-interleaved.json +31 -0
- muxws-0.2.0/conformance/sequences/bytes-payload-under-binary-codec.json +13 -0
- muxws-0.2.0/conformance/sequences/cancel-mid-stream-stops-the-producer.json +29 -0
- muxws-0.2.0/conformance/sequences/concurrency-limit-rejection.json +20 -0
- muxws-0.2.0/conformance/sequences/goaway-drains-then-closes.json +30 -0
- muxws-0.2.0/conformance/sequences/handler-raises-produces-application-error.json +33 -0
- muxws-0.2.0/conformance/sequences/notify-is-open-end-with-nothing-awaited.json +13 -0
- muxws-0.2.0/conformance/sequences/small-frame-overtakes-a-fragmented-payload.json +26 -0
- muxws-0.2.0/conformance/sequences/streaming-response-until-end.json +20 -0
- muxws-0.2.0/conformance/sequences/timeout-sends-reset-timeout.json +11 -0
- muxws-0.2.0/conformance/sequences/unary-request-with-server-push-interleaved.json +22 -0
- muxws-0.2.0/conformance/sequences/unknown-envelope-field-is-ignored.json +17 -0
- muxws-0.2.0/conformance/sequences/unknown-frame-type-is-ignored.json +16 -0
- muxws-0.2.0/muxws/__init__.py +94 -0
- muxws-0.2.0/muxws/api.py +267 -0
- muxws-0.2.0/muxws/codecs/__init__.py +99 -0
- muxws-0.2.0/muxws/codecs/json_.py +71 -0
- muxws-0.2.0/muxws/codecs/msgpack_.py +91 -0
- muxws-0.2.0/muxws/conf.py +28 -0
- muxws-0.2.0/muxws/conftest.py +275 -0
- muxws-0.2.0/muxws/errors.py +177 -0
- muxws-0.2.0/muxws/fragment.py +276 -0
- muxws-0.2.0/muxws/frames.py +112 -0
- muxws-0.2.0/muxws/lifecycle.py +113 -0
- muxws-0.2.0/muxws/observability.py +61 -0
- muxws-0.2.0/muxws/peer.py +1043 -0
- muxws-0.2.0/muxws/py.typed +0 -0
- muxws-0.2.0/muxws/reconnect.py +579 -0
- muxws-0.2.0/muxws/registry.py +128 -0
- muxws-0.2.0/muxws/stream.py +314 -0
- muxws-0.2.0/muxws/subprotocol.py +102 -0
- muxws-0.2.0/muxws/transports/__init__.py +44 -0
- muxws-0.2.0/muxws/transports/memory.py +81 -0
- muxws-0.2.0/muxws/transports/starlette.py +93 -0
- muxws-0.2.0/muxws/transports/websockets_.py +112 -0
- muxws-0.2.0/muxws/writer.py +237 -0
- muxws-0.2.0/pyproject.toml +165 -0
muxws-0.2.0/.gitignore
ADDED
muxws-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jure Erznožnik
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
muxws-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: muxws
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Multiplexed, cancellable, bidirectional streams over one WebSocket - protocol and reference implementation.
|
|
5
|
+
Project-URL: Homepage, https://github.com/velis74/muxws
|
|
6
|
+
Project-URL: Repository, https://github.com/velis74/muxws
|
|
7
|
+
Project-URL: Issues, https://github.com/velis74/muxws/issues
|
|
8
|
+
Project-URL: Documentation, https://docs.velis.si/muxws/
|
|
9
|
+
Author-email: Jure Erznožnik <jure.erznoznik@gmail.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: asyncio,multiplexing,streams,websocket
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Provides-Extra: demo
|
|
26
|
+
Requires-Dist: fastapi; extra == 'demo'
|
|
27
|
+
Requires-Dist: uvicorn; extra == 'demo'
|
|
28
|
+
Requires-Dist: websockets; extra == 'demo'
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: build; extra == 'dev'
|
|
31
|
+
Requires-Dist: coverage; extra == 'dev'
|
|
32
|
+
Requires-Dist: fastapi; extra == 'dev'
|
|
33
|
+
Requires-Dist: httpx; extra == 'dev'
|
|
34
|
+
Requires-Dist: msgpack; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-asyncio; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
38
|
+
Requires-Dist: starlette; extra == 'dev'
|
|
39
|
+
Requires-Dist: uvicorn; extra == 'dev'
|
|
40
|
+
Requires-Dist: websockets; extra == 'dev'
|
|
41
|
+
Provides-Extra: msgpack
|
|
42
|
+
Requires-Dist: msgpack>=1.0; extra == 'msgpack'
|
|
43
|
+
Provides-Extra: starlette
|
|
44
|
+
Requires-Dist: starlette>=0.37; extra == 'starlette'
|
|
45
|
+
Provides-Extra: websockets
|
|
46
|
+
Requires-Dist: websockets>=12; extra == 'websockets'
|
|
47
|
+
Description-Content-Type: text/markdown
|
|
48
|
+
|
|
49
|
+
# muxws
|
|
50
|
+
|
|
51
|
+
**HTTP/3 stream semantics over a WebSocket.** Many independent, cancellable, bidirectional streams on
|
|
52
|
+
one socket, either end able to open one - the model HTTP/2 and HTTP/3 already settled, without needing
|
|
53
|
+
QUIC or an HTTP/3 stack. The wire format is the product; Python and TypeScript are the two ports that
|
|
54
|
+
exist today, and [`SPEC.md`](https://github.com/velis74/muxws/blob/main/SPEC.md) plus
|
|
55
|
+
[`conformance/`](https://github.com/velis74/muxws/blob/main/conformance/README.md) are what a third is
|
|
56
|
+
written from.
|
|
57
|
+
|
|
58
|
+
The mimicry is of *semantics*, not transport: one TCP connection means one global message order and no
|
|
59
|
+
per-stream loss recovery - [the rationale](https://docs.velis.si/muxws/guide/rationale) says what is and
|
|
60
|
+
is not copied. muxws is not a router, not a serializer of domain objects, not an authentication
|
|
61
|
+
mechanism, not a durable store and not an RPC framework.
|
|
62
|
+
|
|
63
|
+
## Install
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install muxws # extras: [starlette], [websockets], [msgpack]
|
|
67
|
+
npm install muxws # optional peers: ws, @msgpack/msgpack
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
**[docs.velis.si/muxws](https://docs.velis.si/muxws/) is the manual** - or build it yourself with
|
|
73
|
+
`npm run docs:dev`.
|
|
74
|
+
|
|
75
|
+
| | |
|
|
76
|
+
|---|---|
|
|
77
|
+
| Server and client in three files | [Getting started](https://docs.velis.si/muxws/guide/getting-started) |
|
|
78
|
+
| Every public symbol, both languages | [API reference](https://docs.velis.si/muxws/api/) |
|
|
79
|
+
| 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) |
|
|
80
|
+
|
|
81
|
+
## Status
|
|
82
|
+
|
|
83
|
+
0.1.0, alpha - the first release. Two versions that move independently: the *wire* is already at its
|
|
84
|
+
first generation and frozen there (`muxws.v1.<codec>` is the subprotocol, and `v1` stays until a
|
|
85
|
+
breaking change earns a new one), while the *package* carries a leading zero because none of this has
|
|
86
|
+
been through a real deployment yet. 1.0 is what the first confirmed production use earns. Python
|
|
87
|
+
package `muxws` (PyPI); npm package `muxws`, browser entry plus the `muxws/node` and `muxws/msgpack`
|
|
88
|
+
subpaths.
|
|
89
|
+
|
|
90
|
+
## Licence
|
|
91
|
+
|
|
92
|
+
MIT. Copyright © 2025 Jure Erznožnik.
|
muxws-0.2.0/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# muxws
|
|
2
|
+
|
|
3
|
+
**HTTP/3 stream semantics over a WebSocket.** Many independent, cancellable, bidirectional streams on
|
|
4
|
+
one socket, either end able to open one - the model HTTP/2 and HTTP/3 already settled, without needing
|
|
5
|
+
QUIC or an HTTP/3 stack. The wire format is the product; Python and TypeScript are the two ports that
|
|
6
|
+
exist today, and [`SPEC.md`](https://github.com/velis74/muxws/blob/main/SPEC.md) plus
|
|
7
|
+
[`conformance/`](https://github.com/velis74/muxws/blob/main/conformance/README.md) are what a third is
|
|
8
|
+
written from.
|
|
9
|
+
|
|
10
|
+
The mimicry is of *semantics*, not transport: one TCP connection means one global message order and no
|
|
11
|
+
per-stream loss recovery - [the rationale](https://docs.velis.si/muxws/guide/rationale) says what is and
|
|
12
|
+
is not copied. muxws is not a router, not a serializer of domain objects, not an authentication
|
|
13
|
+
mechanism, not a durable store and not an RPC framework.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install muxws # extras: [starlette], [websockets], [msgpack]
|
|
19
|
+
npm install muxws # optional peers: ws, @msgpack/msgpack
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
**[docs.velis.si/muxws](https://docs.velis.si/muxws/) is the manual** - or build it yourself with
|
|
25
|
+
`npm run docs:dev`.
|
|
26
|
+
|
|
27
|
+
| | |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Server and client in three files | [Getting started](https://docs.velis.si/muxws/guide/getting-started) |
|
|
30
|
+
| Every public symbol, both languages | [API reference](https://docs.velis.si/muxws/api/) |
|
|
31
|
+
| 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) |
|
|
32
|
+
|
|
33
|
+
## Status
|
|
34
|
+
|
|
35
|
+
0.1.0, alpha - the first release. Two versions that move independently: the *wire* is already at its
|
|
36
|
+
first generation and frozen there (`muxws.v1.<codec>` is the subprotocol, and `v1` stays until a
|
|
37
|
+
breaking change earns a new one), while the *package* carries a leading zero because none of this has
|
|
38
|
+
been through a real deployment yet. 1.0 is what the first confirmed production use earns. Python
|
|
39
|
+
package `muxws` (PyPI); npm package `muxws`, browser entry plus the `muxws/node` and `muxws/msgpack`
|
|
40
|
+
subpaths.
|
|
41
|
+
|
|
42
|
+
## Licence
|
|
43
|
+
|
|
44
|
+
MIT. Copyright © 2025 Jure Erznožnik.
|