skillfed

aioice

An implementation of Interactive Connectivity Establishment (RFC 5245)

aioice v0.10.2 2.0M downloads/30d#3,349 on PyPI141
Permissive license BSD-3-Clause Active released

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 aioice

uv

uv add aioice

poetry

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 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

ICE protocol implementationpeer-to-peer UDP connectivityNAT traversal asyncioWebRTC connectivityRFC 5245 implementationasyncio network traversalinteractive connectivity establishment
webrtcnat-traversalpeer-to-peer

More Internet packages