On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

  • Recent Posts

    April 2017
    M T W T F S S
    « Mar   May »
  • Subscribe Options

  • Awards

  • Most Valuable Blogger @ DZone
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 173 other followers

  • Follow MyThinkPond on
  • Blog Stats

    • 364,698 hits
  • General Options

uvloop – Python replacement for asyncio event loop

Posted by Venkatt Guhesan on April 1, 2017

uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood.

Benefits: uvloop makes asyncio 2-4x faster.
Cons: uvloop is available from PyPI but it requires Python 3.5. (The reason for this is asyncio was introduced in Python 3.4 and above.) Unless your project is based on Python 3.4+ – you may not be able to leverage this library.
Alternatives: For the folks that are using Python 2.7 (including me), if you search for “asyncio alternatives” you will quickly come across the Trollius project. But unfortunately this project is no longer under development. Eventually, you will arrive a discussion on GIL and multi-cores like this article. Yes, the Python community is torn between 2.7 and 3.x. Your best bet at this point of time for Python 2.7 users is to leverage Tornado’s async facility using Callbacks, futures, promises and deferred.  A hybrid but elegant alternative is to use Cyclone (Takes Tornado’s elegance and applies it to Twisted library).

Read more about uvloop here:

To learn more about the other libraries mentioned here refer to this blog article:


Today’s inspirational quote:
  • Letting go is a necessary, if sometimes heart-wrenching gateway to genuine transformation.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: