Warning
*******

**New usages of eventlet are now heavily discouraged! Please read the
following.**

Eventlet was created almost 18 years ago, at a time where async
features were absent from the CPython stdlib. With time eventlet
evolved and CPython too, but since several years the maintenance
activity of eventlet dicreased leading to a growing gap between
eventlet and the CPython implementation.

This gap is now too high and can lead you to unexpected side effects
and bugs in your applications.

Eventlet now follows a new maintenance policy. **Only maintenance for
stability and bug fixing** will be provided. **No new features will be
accepted**, except those related to the asyncio migration. **Usages in
new projects are discouraged**. **Our goal is to plan the retirement
of eventlet** and to give you ways to move away from eventlet.

If you are looking for a library to manage async network programming,
and if you do not yet use eventlet, then, we encourage you to use
asyncio, which is the official async library of the CPython stdlib.

If you already use eventlet, we hope to enable migration to asyncio
for some use cases; see Migrating off of Eventlet. Only new features
related to the migration solution will be accepted.

If you have questions concerning maintenance goals or concerning the
migration do not hesitate to open a new issue, we will be happy to
answer them.


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",
       "http://python.org/images/python-logo.gif",
       "http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif",
   ]

   import eventlet
   from eventlet.green.urllib.request import urlopen

   def fetch(url):
       return urlopen(url).read()

   pool = eventlet.GreenPool()
   for body in pool.imap(fetch, urls):
       print("got body", len(body))


Supported Python versions
*************************

Currently supporting CPython 3.7+.


Contents
********

* Migrating off of Eventlet

  * Step 1. Switch to the "asyncio" Hub

  * Step 2. Migrate code to "asyncio"

  * Step 3. Drop Eventlet altogether

  * Known limitations and work in progress

  * Alternatives

* Basic Usage

* Primary API

  * Greenthread Spawn

  * Greenthread Control

  * Patching Functions

  * Network Convenience Functions

* Design Patterns

  * Client Pattern

  * Server Pattern

  * Dispatch Pattern

* Greening The World

  * Import Green

  * Monkeypatching the Standard Library

* Examples

  * Web Crawler

  * WSGI Server

  * Echo Server

  * Socket Connect

  * Multi-User Chat Server

  * Feed Scraper

  * Port Forwarder

  * Recursive Web Crawler

  * Producer Consumer Web Crawler

  * Websocket Server Example

  * Websocket Multi-User Chat Example

* Using SSL With Eventlet

  * PyOpenSSL

* Threads

  * Tpool - Simple thread pool

* Zeromq

  * What is ØMQ?

  * API documentation

* Understanding Eventlet Hubs

  * "eventlet.hubs.use_hub()"

  * How the Hubs Work

  * More Hub-Related Functions

* Testing Eventlet

  * Doctests

  * Testing Eventlet Hubs

  * Writing Tests

  * Coverage

* Environment Variables

* Module Reference

  * "backdoor" -- Python interactive interpreter within a running
    process

  * "corolocal" -- Coroutine local storage

  * "dagpool" -- Dependency-Driven Greenthreads

  * Module Contents

  * "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

* Authors

  * Maintainer (i.e., Who To Hassle If You Find Bugs)

  * Original Authors

  * Contributors

  * Linden Lab Contributors

  * Thanks To

* History


License
=======

Eventlet is made available under the terms of the open source MIT
license


Indices and tables
******************

* Index

* Module Index

* Search Page
