4 Here are a bunch of small example programs that use Eventlet. All of these examples can be found in the ``examples`` directory of a source copy of Eventlet.
6 .. _web_crawler_example:
10 ``examples/webcrawler.py``
12 .. literalinclude:: ../examples/webcrawler.py
14 .. _wsgi_server_example:
20 .. literalinclude:: ../examples/wsgi.py
22 .. _echo_server_example:
26 ``examples/echoserver.py``
28 .. literalinclude:: ../examples/echoserver.py
30 .. _socket_connect_example:
34 ``examples/connect.py``
36 .. literalinclude:: ../examples/connect.py
38 .. _chat_server_example:
40 Multi-User Chat Server
41 -----------------------
42 ``examples/chat_server.py``
44 This is a little different from the echo server, in that it broadcasts the
45 messages to all participants, not just the sender.
47 .. literalinclude:: ../examples/chat_server.py
49 .. _feed_scraper_example:
52 -----------------------
53 ``examples/feedscraper.py``
55 This example requires `Feedparser <http://www.feedparser.org/>`_ to be installed or on the PYTHONPATH.
57 .. literalinclude:: ../examples/feedscraper.py
59 .. _forwarder_example:
62 -----------------------
63 ``examples/forwarder.py``
65 .. literalinclude:: ../examples/forwarder.py
67 .. _recursive_crawler_example:
70 -----------------------------------------
71 ``examples/recursive_crawler.py``
73 This is an example recursive web crawler that fetches linked pages from a seed url.
75 .. literalinclude:: ../examples/recursive_crawler.py
77 .. _producer_consumer_example:
79 Producer Consumer Web Crawler
80 -----------------------------------------
81 ``examples/producer_consumer.py``
83 This is an example implementation of the producer/consumer pattern as well as being identical in functionality to the recursive web crawler.
85 .. literalinclude:: ../examples/producer_consumer.py
87 .. _websocket_example:
89 Websocket Server Example
90 --------------------------
91 ``examples/websocket.py``
93 This exercises some of the features of the websocket server
96 .. literalinclude:: ../examples/websocket.py
98 .. _websocket_chat_example:
100 Websocket Multi-User Chat Example
101 -----------------------------------
102 ``examples/websocket_chat.py``
104 This is a mashup of the websocket example and the multi-user chat example, showing how you can do the same sorts of things with websockets that you can do with regular sockets.
106 .. literalinclude:: ../examples/websocket_chat.py