1Eventlet Documentation 2==================================== 3 4Code talks! This is a simple web crawler that fetches a bunch of urls concurrently: 5 6.. code-block:: python 7 8 urls = [ 9 "http://www.google.com/intl/en_ALL/images/logo.gif", 10 "http://python.org/images/python-logo.gif", 11 "http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif", 12 ] 13 14 import eventlet 15 from eventlet.green.urllib.request import urlopen 16 17 def fetch(url): 18 return urlopen(url).read() 19 20 pool = eventlet.GreenPool() 21 for body in pool.imap(fetch, urls): 22 print("got body", len(body)) 23 24Supported Python versions 25========================= 26 27Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is deprecated and will be removed in the future**, only CPython 3.5+ support will remain. 28 29 30Contents 31========= 32 33.. toctree:: 34 :maxdepth: 2 35 36 basic_usage 37 design_patterns 38 patching 39 examples 40 ssl 41 threading 42 zeromq 43 hubs 44 testing 45 environment 46 47 modules 48 49 authors 50 history 51 52License 53--------- 54Eventlet is made available under the terms of the open source `MIT license <http://www.opensource.org/licenses/mit-license.php>`_ 55 56Indices and tables 57================== 58 59* :ref:`genindex` 60* :ref:`modindex` 61* :ref:`search` 62