An implementation of Interactive Connectivity Establishment (RFC 5245)
Project Links
Meta
Author: Jeremy Lainé
Requires Python: >=3.9
Classifiers
Development Status
- 5 - Production/Stable
Environment
- Web Environment
Intended Audience
- Developers
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
What is aioice?
aioice is a library for Interactive Connectivity Establishment (RFC 5245) in Python. It is built on top of asyncio, Python’s standard asynchronous I/O framework.
Interactive Connectivity Establishment (ICE) is useful for applications that establish peer-to-peer UDP data streams, as it facilitates NAT traversal. Typical usecases include SIP and WebRTC.
To learn more about aioice please read the documentation.
Example
import asyncio
import aioice
async def connect_using_ice():
connection = aioice.Connection(ice_controlling=True)
# gather local candidates
await connection.gather_candidates()
# send your information to the remote party using your signaling method
send_local_info(
connection.local_candidates,
connection.local_username,
connection.local_password)
# receive remote information using your signaling method
remote_candidates, remote_username, remote_password = get_remote_info()
# perform ICE handshake
for candidate in remote_candidates:
await connection.add_remote_candidate(candidate)
await connection.add_remote_candidate(None)
connection.remote_username = remote_username
connection.remote_password = remote_password
await connection.connect()
# send and receive data
await connection.sendto(b'1234', 1)
data, component = await connection.recvfrom()
# close connection
await connection.close()
asyncio.run(connect_using_ice())
License
aioice is released under the BSD license.
0.10.2
Nov 28, 2025
0.10.1
Apr 13, 2025
0.10.0
Apr 10, 2025
0.9.0
Apr 01, 2023
0.8.0
Jan 30, 2023
0.7.6
Jan 24, 2022
0.7.5
Feb 13, 2021
0.7.4
Feb 13, 2021
0.7.3
Feb 04, 2021
0.7.2
Jan 29, 2021
0.7.1
Jan 27, 2021
0.7.0
Jan 26, 2021
0.6.18
Mar 06, 2020
0.6.17
Feb 20, 2020
0.6.16
Nov 02, 2019
0.6.15
Jul 07, 2019
0.6.14
Jan 29, 2019
0.6.13
Jan 28, 2019
0.6.12
Jan 08, 2019
0.6.11
Jan 06, 2019
0.6.10
Oct 17, 2018
0.6.9
Oct 14, 2018
0.6.8
Aug 22, 2018
0.6.7
Aug 22, 2018
0.6.6
Aug 17, 2018
0.6.5
Aug 12, 2018
0.6.4
Jul 26, 2018
0.6.3
Jul 26, 2018
0.6.2
Jul 01, 2018
0.6.1
Jun 29, 2018
0.6.0
Jun 23, 2018
0.5.2
Jun 20, 2018
0.5.1
Mar 17, 2018
0.5.0
Mar 17, 2018
0.4.5
Mar 15, 2018
0.4.4
Mar 04, 2018
0.4.3
Mar 04, 2018
0.4.2
Feb 28, 2018
0.4.1
Feb 23, 2018
0.4.0
Feb 19, 2018
0.3.3
Feb 13, 2018
0.3.2
Feb 12, 2018
0.3.1
Feb 12, 2018
0.3.0
Feb 10, 2018
0.2.0
Feb 10, 2018
0.1.6
Feb 07, 2018
0.1.5
Feb 04, 2018
0.1.4
Feb 04, 2018
0.1.3
Feb 04, 2018