aiortc implements WebRTC and ORTC on asyncio so Python programs can build peers, media tracks, and data channels with familiar async patterns.
Overview
aiortc brings Web Real-Time Communication and ORTC to Python using asyncio. The API mirrors the JavaScript WebRTC shape while swapping promises for coroutines and events for pyee emitters.
It targets developers who want readable Python WebRTC rather than only browser or native C++ stacks tightly coupled to fixed media pipelines. Examples include signaling servers, data channels, and computer-vision processing on video frames.
Documentation walks through peer connections, media, ICE, and interoperability concerns. Test and coverage badges reflect an actively maintained OSS project with published docs.
Because it is a library, you embed it inside larger async services or experiments rather than running it as a standalone end-user app.
Key features
- asyncio peer connections
- Media and data channels
- JavaScript-like API surface
- Event emitter integration
- Python-native media hooks
- Documented examples
- ORTC coverage
- OpenCV-friendly processing
Use cases
- Python WebRTC prototypes
- Custom signaling servers
- Vision on video frames
- Data channel tooling
- Teaching WebRTC internals