--- id: aioice version: "0.10.2" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # aioice — An implementation of Interactive Connectivity Establishment (RFC 5245) License: permissive · Maintenance: active · Downloads: 2.0M/mo ## What it is and what it does aioice is a Python library that implements the Interactive Connectivity Establishment (ICE) protocol, which solves the problem of establishing direct peer-to-peer UDP connections across network address translation (NAT) boundaries. It wraps the protocol logic in asyncio, Python's standard asynchronous I/O framework, making it suitable for applications that need to negotiate and maintain UDP data streams between peers—most commonly WebRTC and SIP applications. The library handles the full ICE workflow: gathering local network candidates, exchanging candidate information with a remote peer via your own signaling channel, performing the ICE handshake to select the best working candidate pair, and then sending and receiving data over the established connection. It abstracts away the complexity of NAT traversal, STUN/TURN server interaction, and candidate prioritization, leaving you to focus on your application's signaling and data handling logic. Use it for: - Building WebRTC applications that need direct peer-to-peer audio/video or data channels. - Implementing SIP-based VoIP systems with NAT traversal for residential or enterprise networks. - Creating peer-to-peer file transfer or collaborative tools that bypass centralized servers. - Developing real-time communication frameworks that require low-latency direct connections. - Testing or prototyping network connectivity solutions that rely on ICE candidate negotiation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. aioice implements Interactive Connectivity Establishment (RFC 5245) for peer-to-peer UDP connectivity over asyncio, enabling NAT traversal for applications like WebRTC and SIP. Yes. aioice is actively maintained, has no known vulnerabilities, installs with minimal friction, and is the standard choice for ICE protocol support in Python asyncio applications. Use it if you are building WebRTC, SIP, or any peer-to-peer UDP application that needs NAT traversal; skip it if your use case does not require ICE or if you are not using asyncio. ## Install pip install aioice uv add aioice poetry add aioice ## Installing aioice Before you install: Low friction: pure Python wheel with only two lightweight runtime dependencies (dnspython and ifaddr). Actively maintained with a recent release and no known vulnerabilities. License in practice: BSD-3-Clause is permissive; you can use, modify, and distribute aioice with minimal restrictions, provided you include the license notice. Quickstart: import asyncio import aioice async def main(): connection = aioice.Connection(ice_controlling=True) await connection.gather_candidates() # Add remote candidates and perform handshake await connection.connect() await connection.sendto(b'data', 1) asyncio.run(main()) Requires Python 3.9 or later; asyncio event loop must be running. Verify before relying: - Whether the library handles all RFC 5245 edge cases or has known limitations in specific NAT scenarios. - Performance characteristics under high-throughput or high-latency conditions. - Compatibility with specific WebRTC implementations or SIP stacks beyond the documented use cases. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ICE protocol implementation, peer-to-peer UDP connectivity, NAT traversal asyncio, WebRTC connectivity, RFC 5245 implementation, asyncio network traversal, interactive connectivity establishment, webrtc, nat-traversal, peer-to-peer [View on SkillFed](https://skillfed.io/packages/aioice) · [View on PyPI](https://pypi.org/project/aioice/)