Add python-eventlet 0.16.1
[packages/trusty/python-eventlet.git] / eventlet / doc / index.rst
1 Eventlet Documentation
2 ====================================
3
4 Code 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 import urllib2
16
17     def fetch(url):
18         return urllib2.urlopen(url).read()
19
20     pool = eventlet.GreenPool()
21     for body in pool.imap(fetch, urls):
22         print("got body", len(body))
23
24 Contents
25 =========
26
27 .. toctree::
28    :maxdepth: 2
29
30    basic_usage
31    design_patterns
32    patching
33    examples
34    ssl
35    threading
36    zeromq
37    hubs
38    testing
39    environment
40
41    modules
42
43    authors
44    history
45
46 License
47 ---------
48 Eventlet is made available under the terms of the open source `MIT license <http://www.opensource.org/licenses/mit-license.php>`_
49
50 Indices and tables
51 ==================
52
53 * :ref:`genindex`
54 * :ref:`modindex`
55 * :ref:`search`