Eventlet Documentation¶
Code talks! This is a simple web crawler that fetches a bunch of urls concurrently:
urls = ["http://www.google.com/intl/en_ALL/images/logo.gif",
"https://wiki.secondlife.com/w/images/secondlife.jpg",
"http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif"]
import eventlet
from eventlet.green import urllib2
def fetch(url):
return urllib2.urlopen(url).read()
pool = eventlet.GreenPool()
for body in pool.imap(fetch, urls):
print("got body", len(body))
Contents¶
- Basic Usage
- Primary API
- Design Patterns
- Greening The World
- Examples
- Using SSL With Eventlet
- Threads
- Zeromq
- Understanding Eventlet Hubs
- Testing Eventlet
- Environment Variables
- Module Reference
- backdoor – Python interactive interpreter within a running process
- corolocal – Coroutine local storage
- debug – Debugging tools for Eventlet
- db_pool – DBAPI 2 database connection pooling
- event – Cross-greenthread primitive
- greenpool – Green Thread Pools
- greenthread – Green Thread Implementation
- pools - Generic pools of resources
- queue – Queue class
- semaphore – Semaphore classes
- timeout – Universal Timeouts
- websocket – Websocket Server
- wsgi – WSGI server
- eventlet.green.zmq – ØMQ support
- zmq – The pyzmq ØMQ python bindings
- Authors
- History
License¶
Eventlet is made available under the terms of the open source MIT license