tessl install tessl/pypi-aiortc@1.13.0Python implementation of WebRTC and ORTC for real-time peer-to-peer communication
Agent Success
Agent success rate when using this tile
87%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.02x
Baseline
Agent success rate without this tile
85%
Build a connection negotiator that establishes a WebRTC connection between two peers through proper SDP offer/answer exchange. The negotiator should handle the complete signaling flow from offer creation through answer acceptance.
Your implementation should:
Create a Python module with an async function negotiate_connection() that:
Input: Execute the negotiation function
Expected Output:
Test File: test_negotiation.py
import pytest
from negotiation import negotiate_connection
@pytest.mark.asyncio
async def test_successful_negotiation():
offering_state, answering_state = await negotiate_connection()
assert offering_state == "stable"
assert answering_state == "stable"Input: Execute the negotiation function
Expected Output:
Test File: test_negotiation.py
import pytest
from negotiation import negotiate_connection
@pytest.mark.asyncio
async def test_no_errors():
try:
await negotiate_connection()
success = True
except Exception:
success = False
assert success is TrueProvides WebRTC implementation for Python including peer connection management and SDP negotiation.