aioice
An implementation of Interactive Connectivity Establishment (RFC 5245)
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 on this page — 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
aioice on PyPI
pip
pip install aioiceuv
uv add aioicepoetry
poetry add aioiceInstalling 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 the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — dnspython, ifaddr |
| Maintenance | actively maintained — 259 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,037,028/month — #3,349 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aioice-0.10.2-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
aiortcaiortc is a Python library implementing WebRTC…
permissive · top 5,000 on PyPI
aiohappyeyeballsImplements Happy Eyeballs (RFC 8305) connection…
permissive · top 100 on PyPI
go2rtc-clientAsynchronous Python client library for…
permissive · top 15,000 on PyPI
anyioAnyIO provides a unified asynchronous API that…
permissive · top 100 on PyPI
pproxypproxy is an asynchronous proxy server that…
permissive · top 15,000 on PyPI
aiopnsenseAn async Python client library that wraps…
permissive · top 15,000 on PyPI
pmd-net-protoParses, assembles, and validates network…
copyleft · top 15,000 on PyPI
aioquicaioquic implements QUIC and HTTP/3 network…
permissive · top 5,000 on PyPI
asyncio-dgramProvides simple async/await wrappers for UDP…
permissive · top 15,000 on PyPI
miniupnpcPython binding for MiniUPnPc library that…
permissive · top 15,000 on PyPI