Skip to main content

Generate mediasoup producer code (pymediasoup) from proto4webrtc-annotated protofiles

Project description

proto4webrtc (Python)

Generates typed mediasoup producer code (pymediasoup) from protobuf messages annotated with proto4webrtc options. The TypeScript consumer counterpart is the npm package protoc-gen-proto4webrtc-ts.

pip install proto4webrtc
python -m proto4webrtc_codegen --proto path/to/protos --out out/
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).

Also installs the raw protoc plugin protoc-gen-proto4webrtc_python (--proto4webrtc_python_out).

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proto4webrtc-0.4.1.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proto4webrtc-0.4.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file proto4webrtc-0.4.1.tar.gz.

File metadata

  • Download URL: proto4webrtc-0.4.1.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for proto4webrtc-0.4.1.tar.gz
Algorithm Hash digest
SHA256 d73de24e20fd5f75a39a453342e62bbe7ff078bc99e4b5a1d4d80f06bd234480
MD5 463441cc421cc06d8d4f83aac7f70547
BLAKE2b-256 f1e282997fe014856d13fec02033d6783e7ed0ba3a4ef2d19b58a7729e51ea5b

See more details on using hashes here.

File details

Details for the file proto4webrtc-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: proto4webrtc-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for proto4webrtc-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e6307c334fa8473e69e7b41016cf138d28ab62d52b27c887b51d8136947a1a6
MD5 a22e8dda154f7dd29b384a4f27ad8a23
BLAKE2b-256 7724c78795947f8936e3fc4c1e5146a471c80cd50a194e60242af07ca3db584d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page