Skip to main content

An implementation of WebRTC and ORTC

Project description

aiortc License Version Python versions Tests Coverage Documentation

What is aiortc?

aiortc is a library for Web Real-Time Communication (WebRTC) and Object Real-Time Communication (ORTC) in Python. It is built on top of asyncio, Python’s standard asynchronous I/O framework.

The API closely follows its Javascript counterpart while using pythonic constructs:

  • promises are replaced by coroutines

  • events are emitted using pyee.EventEmitter

To learn more about aiortc please read the documentation.

Why should I use aiortc?

The main WebRTC and ORTC implementations are either built into web browsers, or come in the form of native code. While they are extensively battle tested, their internals are complex and they do not provide Python bindings. Furthermore they are tightly coupled to a media stack, making it hard to plug in audio or video processing algorithms.

In contrast, the aiortc implementation is fairly simple and readable. As such it is a good starting point for programmers wishing to understand how WebRTC works or tinker with its internals. It is also easy to create innovative products by leveraging the extensive modules available in the Python ecosystem. For instance you can build a full server handling both signaling and data channels or apply computer vision algorithms to video frames using OpenCV.

Furthermore, a lot of effort has gone into writing an extensive test suite for the aiortc code to ensure best-in-class code quality.

Implementation status

aiortc allows you to exchange audio, video and data channels and interoperability is regularly tested against both Chrome and Firefox. Here are some of its features:

  • SDP generation / parsing

  • Interactive Connectivity Establishment, with half-trickle and mDNS support

  • DTLS key and certificate generation

  • DTLS handshake, encryption / decryption (for SCTP)

  • SRTP keying, encryption and decryption for RTP and RTCP

  • Pure Python SCTP implementation

  • Data Channels

  • Sending and receiving audio (Opus / PCMU / PCMA)

  • Sending and receiving video (VP8 / H.264)

  • Bundling audio / video / data channels

  • RTCP reports, including NACK / PLI to recover from packet loss

Installing

The easiest way to install aiortc is to run:

pip install aiortc

Building from source

If there are no wheels for your system or if you wish to build aiortc from source you will need a couple of libraries installed on your system:

  • Opus for audio encoding / decoding

  • LibVPX for video encoding / decoding

Linux

On Debian/Ubuntu run:

apt install libopus-dev libvpx-dev

OS X

On OS X run:

brew install opus libvpx

License

aiortc is released under the BSD license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiortc-1.8.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

aiortc-1.8.0-pp310-pypy310_pp73-win_amd64.whl (1.0 MB view details)

Uploaded PyPy Windows x86-64

aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

aiortc-1.8.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

aiortc-1.8.0-pp39-pypy39_pp73-win_amd64.whl (1.0 MB view details)

Uploaded PyPy Windows x86-64

aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

aiortc-1.8.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

aiortc-1.8.0-pp38-pypy38_pp73-win_amd64.whl (1.0 MB view details)

Uploaded PyPy Windows x86-64

aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

aiortc-1.8.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded PyPy macOS 10.9+ x86-64

aiortc-1.8.0-cp38-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.8+ Windows x86-64

aiortc-1.8.0-cp38-abi3-win32.whl (923.0 kB view details)

Uploaded CPython 3.8+ Windows x86

aiortc-1.8.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

aiortc-1.8.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

aiortc-1.8.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

aiortc-1.8.0-cp38-abi3-macosx_11_0_arm64.whl (896.2 kB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

aiortc-1.8.0-cp38-abi3-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8+ macOS 10.9+ x86-64

File details

Details for the file aiortc-1.8.0.tar.gz.

File metadata

  • Download URL: aiortc-1.8.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for aiortc-1.8.0.tar.gz
Algorithm Hash digest
SHA256 2363c08d1d2cb3aaed563c1fb256f5dae9f3ba75b70ad5e5df6d448504122591
MD5 ca8106789dc12640c808b78face98ef2
BLAKE2b-256 e9d4172ba4ecdc18a5d4c6017dc779f8fe34c478764b54b90d58403d0128cd81

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 4054f42f9ef875c67e38c0e86532e85e7ba528957052bc3d99e7c7caf273c456
MD5 7f1f67ac2a219e12822ca83454ba4093
BLAKE2b-256 726b46a46cd9be74f9a8f360e59392a22fea22a9ac1dedcc0000b0e6321ec8db

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0bb565acb623474d8052926f2ee768dbf1f87a71d271df78482319c0bec7c817
MD5 91014f3e39e538fa474e1bca9d07a872
BLAKE2b-256 3b6f1dddb3631e319c59d83ca35da56dddd2b505bec8aa08e3798e68bd6979a8

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4cbbdf78ac55e05d838fe4de326ed095ca6df1cd10d571958d2ef8f23792203b
MD5 6bdf3e7935edb72408f904361da8a5b7
BLAKE2b-256 2c625f04ac4a95f2ad364e5a96e8257e5c41b3742ccbb40d986b5c9cbec46ad1

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 bd50def722eb6b999ebc831eca7bea79019d2eda71dc79f4219a9ab19d65c961
MD5 d6fdc584496bdb9e2beb575b157877b1
BLAKE2b-256 bdc1739ca0b8eba8b89ebffef7a61825f48ce82c887e1e5b7dcd28c358cace0b

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b0eb1342595e386befcad56cd0f91cd5cd16daa7612ffc5c8abf7e5b58e529f5
MD5 ac07ef9070bd5db0e126df2e9e490795
BLAKE2b-256 2a1a6772d9f4daa345c34f3a066f39636878076504df0b9589889c8e33b9aa9e

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 2e20fe3cb4a8b6db4f5e8f625ff1eb9dafc67b7c0c9a0cb9969b646570aebd34
MD5 19912bc1926559bef51df3a75ee03912
BLAKE2b-256 70dd04921cba3a78c6279d5f454ea3084075419d9e08cf1f360bc90cd79f2e1b

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 29ba65bcb4c4cd1b25109d1e7ee5cf303654b757a3b7b59a28e162953e5f6c36
MD5 b22bebb90405bd122d14a879d2150e9d
BLAKE2b-256 dca36c316d3d674e3b45e85ef351ef2966e90bddeba82dd0ad84c9d9e7ad05fa

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8ccc4da8821e7ecdd2179bc5eb7fd5f12e50db8fc6affdbc8baa55f3f14dd377
MD5 29c07a58f07d6ef7858da2aef2d025b2
BLAKE2b-256 9e66263c61c8247640add115a197e3578d92c84d6acca7274f420904c1b360d3

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1be4571e70e15b443f5b9ae651e24ac9dafb8b9abc1cdeb14e5f4bf028639944
MD5 c904f9cceb74d7a911fcb0fedb4f28c6
BLAKE2b-256 b644884e4eebe5ec314160797e4cd2d14cc929f097615d8cc1654505bd5c2067

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d669b635bbd8cf76fce63d3ceb83da5b219cea8bae4b566233f68618e69446cb
MD5 e6cf69a7cde943926f6381621046f4b9
BLAKE2b-256 78b8283637419137215861f12f1998753ed9d08bdc5acbed0f0d0561bc0591aa

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp38-pypy38_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 09dd2fad7a52f8fc66c86cdd2dd4d281b9815afd996e41301dd2706ccd57438a
MD5 7f0867883e512735713c690644380106
BLAKE2b-256 ddf6318ba4bd0c1553f2188af73672fe98e8e2120d6be34a8910ac9e44f47cb0

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3a1ef2e0d657aaca42106558c7c8d6e84c7088d0b70bc1fe3f93c555c242e38
MD5 180bd6da95baff0cfa0b0ad8e8453654
BLAKE2b-256 9613f3004749f15731adca897a9709f8deb1a09f2c636cc0c8a82c72b347a101

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e53d9f999104a2438c0c23f2cbc991c5e15e46c0fe71476d60c222b62e4c5a70
MD5 a421bb21c1ec51fea3e15a4a0df11740
BLAKE2b-256 e411df813a0426869ffbdf71f059222e18954b810d232f21c2108f42fa76290e

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 454012e08c9ef5027c2543d4e97b6f1323ce027ec395202478a7e431b2519c5b
MD5 b1f35aeaa1e0b8d3ba50e71d45a2d764
BLAKE2b-256 bfb5c6dcf8b1ff722f0e9cf28d34ffc49df59c18d754d15308af47cad37bef66

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ef40f132262a670169121b888a448e1973e892f1ed8a5f5980ab05a12ee78a32
MD5 0fff91052df25030b54ed50e10509619
BLAKE2b-256 880bf47b8f65ebe395ba2c649d8089b9dccfe9a4e44b4ad608230a353f3257fc

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: aiortc-1.8.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for aiortc-1.8.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 76454c55a59441a76f6ab7cd1218454389520d6a3cc9b0d13d428f6a3f2ebbcc
MD5 614d83741be29f7b9f8ace3ba027f884
BLAKE2b-256 a9a96665619d769398b1bb3683dd85d11fbb4682436dc972d7ab434659d76037

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-cp38-abi3-win32.whl.

File metadata

  • Download URL: aiortc-1.8.0-cp38-abi3-win32.whl
  • Upload date:
  • Size: 923.0 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for aiortc-1.8.0-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 4ec0c5c284c3345a9d994253ced4ad909acf9e375271a7ff01db165b09890ce8
MD5 4acfa0f44b44a6fc0ac0503d9fe886d3
BLAKE2b-256 d5bfa67599f86bd3e46d4cf4bff123322c277e9eb621688889bca03f6078d4a8

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b453def215c246486747e8ba5c1307a538071d6bfbb2a4e74ebfef583771a429
MD5 ad2919a4940a8c71288bd6a0b31d1dd2
BLAKE2b-256 463f4c4e26974f133baf5570efa8aa8d2c4cf373b2f1b7b1e635cd7c5e481902

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 173dcfa6f0e989f65eb9d38f151d8834677df0f696f9f4ad925ee9795e914eaf
MD5 800cff3b97564aa864deb518cfc2fb27
BLAKE2b-256 313c831fa01119d71f357f5f83ed093c0824735f2aaab3330f78df6b21cf1111

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 22efeb53dab9eb58a1a6c2dcdeb72ae526de0a2b30334fc40782341df92a657d
MD5 7c35e89408424fc62aea379a0eb76812
BLAKE2b-256 05da9fdd5070f60a76110c0d9133fd1a759401355f8f4cff9c7ee567c704b6a8

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 639afa23b7d5c6f7d4f3f7af5fadb9cc67c82d56e17840b4433d2e5f73958bb5
MD5 58d006a1835c29ef85c971a819e313e5
BLAKE2b-256 134c6c4126cc77ccefbbe12ca2e300a48a33ea76a51744154f42c4e226eaec2b

See more details on using hashes here.

File details

Details for the file aiortc-1.8.0-cp38-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for aiortc-1.8.0-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ac0bc48c9f98a744f6696be287b0403648deb3e20bd7f8fa91eb841e1c6c4e8d
MD5 0601d497b9ef8dd297da3be4124994e4
BLAKE2b-256 653acf8f947a41ef7abecdf2717d50178911dacdaa2ab0f7e0865aa90776a779

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page