livekit / python-sdks

LiveKit real-time and server SDKs for Python
https://docs.livekit.io
Apache License 2.0
95 stars 33 forks source link

Native value types for protobuf enums #31

Closed davidzhao closed 10 months ago

davidzhao commented 1 year ago

Currently for certain enums, they are being exposed directly via protobuf. This is not very simple to use as the user would have to dig through generated protobuf files to see what they are.

We should have native python types for them, ideally a native enum wrapping over the protobuf types. For example, for TrackKind we currently have:

proto_track.TrackKind.ValueType
proto_track.KIND_AUDIO

Ideally this becomes

Track.Kind
Track.Kind.AUDIO