Python async libraries

Updated Nov 2026

Python async libraries run many I/O-bound tasks concurrently in one thread by switching between them while each waits on the network or disk. An event loop schedules each coroutine or green thread and resumes it when its I/O completes. These libraries let web servers, crawlers, and AI agents handle thousands of open connections at once.

Popularity

AnyIO has the most monthly downloads among the registry packages in this comparison, at 1.0B.

LibraryMonthly downloadsStarsLast releaseLicense
AnyIO
1.1B
2.6KNov 2026MIT
uvloop
296.6M
Not on GitHubOct 2026MIT OR Apache-2.0
Tornado
123.2M
Not on GitHubNov 2026Apache-2.0
Trio
42.5M
7.4KOct 2026MIT OR Apache-2.0
gevent
29.1M
6.4KSep 2026MIT
Twisted
15.4M
Not on GitHubOct 2026MIT
aiomultiprocess
5.1M
Not on GitHubApr 2024MIT
Eventlet
2.1M
Not on GitHubOct 2026MIT
Downloads: pypi, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Features compared

LibraryScoped task nurseriesGreenlet task schedulingManaged process workers
AnyIOBuilt-inUnsupportedBuilt-in
uvloopUnsupportedUnsupportedUnsupported
TornadoUnsupportedUnsupportedUnsupported
TrioBuilt-inUnsupportedUnsupported
geventUnsupportedBuilt-inUnsupported
TwistedUnsupportedUnsupportedUnsupported
aiomultiprocessUnsupportedUnsupportedBuilt-in
EventletUnsupportedBuilt-inUnsupported
Built-inNot supported

Libraries and code examples

Provides structured concurrency and asynchronous I/O APIs over asyncio or Trio.

Downloads / mo
1.1B
Stars
2.6K
Last release
4.16.0
License
MIT

Strengths

  • Supports asyncio and Trio backends. Use the same AnyIO APIs on asyncio or Trio.
  • Contains child-task lifetimes. Task-group exit waits for children; an error cancels the remaining tasks.

Limitations

  • Native dependencies constrain the backend. Use asyncio-native dependencies only with the asyncio backend.
  • Cancelled scopes keep raising cancellation. Shield asynchronous cleanup when it must run inside a cancelled scope.

Quickstart

From tasks.html
$ python -m pip install anyio==4.16.0
import anyio

async def main():
    await anyio.sleep(0)

anyio.run(main)

AnyIO examples

From open-source projects on GitHub

Replaces the asyncio event loop with one built on libuv.

Downloads / mo
296.6M
Last release
0.23.0
License
MIT OR Apache-2.0

Quickstart

From README.rst
$ python -m pip install uvloop==0.23.0
import asyncio
import uvloop

async def main():
    await asyncio.sleep(0)

uvloop.run(main())

uvloop examples

From open-source projects on GitHub

Provides a web framework and asynchronous networking library.

Downloads / mo
123.2M
Last release
6.6.1
License
Apache-2.0

Quickstart

From coroutines.html
$ python -m pip install tornado==6.6.1
from tornado.ioloop import IOLoop
from tornado import gen

async def main():
    await gen.sleep(0)

IOLoop.current().run_sync(main)

Tornado examples

From open-source projects on GitHub

Provides native async/await I/O with nurseries and cancellation scopes.

Downloads / mo
42.5M
Stars
7.4K
Last release
0.35.0
License
MIT OR Apache-2.0

Strengths

  • Nurseries contain child-task lifetimes. Nursery exit waits for every child task to finish.
  • Groups deadlines and cancellation. Use cancel scopes to apply deadlines or cancellation to enclosed operations.

Limitations

  • Cancellation waits for checkpoints. Add checkpoints to CPU-bound loops that must respond to cancellation.

Quickstart

From tasks-intro.py
$ python -m pip install trio==0.35.0
import trio

async def main():
    await trio.sleep(0)

trio.run(main)

Trio examples

From open-source projects on GitHub

Runs cooperative networking through greenlets and a synchronous-style API.

Downloads / mo
29.1M
Stars
6.4K
Last release
26.9.0
License
MIT

Strengths

  • Runs blocking-style cooperative network code. Use synchronous-style networking APIs while greenlets yield during cooperative I/O.
  • Limits concurrent work with pools. Use Pool to limit how many greenlets run at once.

Limitations

  • Cooperation requires yielding control. Yield during CPU-heavy work and use cooperative I/O functions.
  • Monkey-patching must happen early. Patch before imports capture the original blocking implementations.

Quickstart

From intro.html
$ python -m pip install gevent==26.9.0
import gevent

job = gevent.spawn(gevent.sleep, 0)
job.join()

gevent examples

From open-source projects on GitHub

Provides an asynchronous networking framework.

Downloads / mo
15.4M
Last release
26.10.0
License
MIT
$ python -m pip install twisted==26.10.0
from twisted.internet.task import react
from twisted.internet.defer import succeed

react(lambda reactor: succeed(None))

Twisted examples

From open-source projects on GitHub
def start(self) -> None:
    if self._running >= self._count:
        return
    self._running += 1
    self._coop.coiterate(self._work).addBoth(self._task_done)

aiomultiprocess

Provides an asyncio version of the standard multiprocessing module.

Downloads / mo
5.1M
Last release
0.9.1
License
MIT

Quickstart

From guide.html
$ python -m pip install aiomultiprocess==0.9.1
import asyncio
from aiomultiprocess import Worker

async def identity(value):
    return value

async def main():
    return await Worker(target=identity, args=(1,))

if __name__ == "__main__":
    asyncio.run(main())

aiomultiprocess examples

From open-source projects on GitHub

Provides a concurrent networking library.

Downloads / mo
2.1M
Last release
0.41.3
License
MIT

Quickstart

From basic_usage.html
$ python -m pip install eventlet==0.41.3
import eventlet

job = eventlet.spawn(eventlet.sleep, 0)
job.wait()

Eventlet examples

From open-source projects on GitHub
def spawn_n(self, *args, **kwargs):
    super(RestrictedGreenPool, self).spawn_n(*args, **kwargs)
    if self._rgp_do_wait:
        self.waitall()

FAQ

AnyIO suits libraries that must run on both asyncio and Trio. uvloop suits asyncio servers that want a faster event loop. gevent suits older synchronous code that needs concurrency without async syntax.

asyncio is the standard library framework for async and await code in Python. It provides the event loop, tasks, and streams that AnyIO and uvloop build on.

AnyIO provides structured concurrency and async I/O APIs that run on top of asyncio or Trio. Its task groups cancel sibling tasks together when one task fails.

uvloop replaces the default asyncio event loop with one built on libuv. Servers install it with a single call at startup.

gevent runs cooperative networking on greenlets behind a synchronous-style API. Monkey-patching makes standard library sockets yield to other greenlets.

asyncio runs coroutines on one thread and switches tasks only at each await. Threading runs functions on operating system threads that the scheduler can switch at any point.

For coding agents

Found your async library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official