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-1.0.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

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

proto4webrtc-1.0.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for proto4webrtc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 be849e555204184dd75a553d11f10955c80abc4b13c4defa392868ff1f29556e
MD5 de798876a00c5fdf785eba8deb720e9a
BLAKE2b-256 d2d9899108bd5c168bebe0e83c099c20ea6b1940abfbe8ba903e0553356ecf17

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for proto4webrtc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd2e4bddef87e48ec78e7348e3233ee5d75d152446d21b88edf288000b58b6db
MD5 b04b491aacb8f4b55f7e0a332b923110
BLAKE2b-256 fcddd8304e96e09235f7f4d38fa8dbc2053f0cd23f2d1d1f0063188b1e8a2231

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