Streaming real time view to python and receiving controls

I’m trying to stream current rendered frame to python and receive controls. I looked into pixel streaming, texture share and tcp communication. I’m not sure which of these approaches is good, if any. Do you know any efficient way of implementing this? Any projects or resources on this topic would be greatly appreciated. Thanks.