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.2.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.2.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: proto4webrtc-0.2.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.2.1.tar.gz
Algorithm Hash digest
SHA256 b0adc3d7e14ca30f6d6501cadc208c8b2c583402e8d42b9b4020ae34a178a0fa
MD5 1fba7772e27482db098d4f5378045abd
BLAKE2b-256 298ea15a7f3d9f5e68bc4bbfd925017454585ff2891b351b3f170b05f558bed3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: proto4webrtc-0.2.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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1fd8475d8f14dad81235b8864853fac5b85ba2a7118dbdc8b1ae1c6da884f02
MD5 a593736c28a55df8b99fe84d4d93a745
BLAKE2b-256 3d59680222fa2fb8c99beabca2dc22d93fdd7a0a6d63fb9a8441d758d76edb97

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