Metadata-Version: 2.4
Name: proto4webrtc
Version: 1.5.0
Summary: Mediasoup producer runtime (pymediasoup) for proto4webrtc-annotated protofiles
Author: Emil Djupvik
License: MIT
Project-URL: Repository, https://github.com/Emil1483/proto4webrtc
Requires-Python: <4,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: protobuf>=7.35.1
Requires-Dist: aiortc>=1.14
Requires-Dist: av>=16
Requires-Dist: pymediasoup>=1.5
Requires-Dist: websockets>=16
Requires-Dist: numpy>=1.26
Provides-Extra: compiler
Requires-Dist: proto4webrtc-codegen==1.5.0; extra == "compiler"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: pytest-asyncio>=0.24; extra == "test"
Dynamic: license-file

# proto4webrtc (Python)

Typed [mediasoup](https://mediasoup.org/) **producer** runtime (pymediasoup)
for code generated from protobuf messages annotated with `proto4webrtc`
options. The TypeScript **consumer** counterpart is the npm package
`protoc-gen-proto4webrtc-ts`.

```sh
pip install proto4webrtc              # runtime only (ship this)
pip install proto4webrtc[compiler]    # + the code generator (build time)
python -m proto4webrtc_codegen --proto path/to/protos --out out/
```

```python
from proto4webrtc_gen import Proto4WebrtcProducer, Telemetry

client = Proto4WebrtcProducer(signaling_url="ws://localhost:3000/api/sfu")
client.run_forever()  # blocking: connects, reconnects on drop, until stop()

client.telemetry.send(Telemetry(stamp=time.time(), value0=0.4))
```

`Proto4WebrtcProducer` owns the whole client — signaling, device/transport
setup, and the reconnect loop. `send()`/`push()` are safe to call from any
thread, anytime (a no-op before the first connection).

The generator lives in the separate distribution `proto4webrtc-codegen`
(pulled in by the `[compiler]` extra), so production images can install the
runtime alone.

Full docs: https://github.com/Emil1483/proto4webrtc
