Contribute Media
A thank you to everyone who makes this possible: Read More

gevent: asynchronous I/O made easy

Summary

gevent provides highly scalable asynchronous I/O without becoming a nest of callbacks, or even needing code changes.

Daniel will explain how to get started with gevent, discuss patterns for its use and describe the differences with Twisted, Tornado and Tulip/asyncio.

Description

It has been claimed "Callbacks are the new GOTO". Most asynchronous IO libraries use callbacks extensively.

gevent (http://www.gevent.org) uses coroutines to provide highly scalable asynchronous I/O with a synchronous programming model that doesn't need code changes and callbacks. By elegantly monkey patching the Python standard library, both your code and all pure Python libraries become asynchronous too, making a separate collection of protocol implementations (in the style of Twisted) unnecessary.

Code written like this is easier to understand, particularly for more junior developers. Crucially, IO errors can be raised at the right places.

I will be introducing gevent's programming model, why it's easier, walk through simple code samples, and discuss experiences and metaphors for programming with it.

Details

Improve this page