From: Menno Smits Date: Tue, 1 Sep 2015 05:01:23 +0000 (+1200) Subject: Document how to use IMAPClient with gevent X-Git-Tag: 1.0.0~1^2~26 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e80f9c9290ed1314546527598e468f4533b7c491;p=imapclient.git Document how to use IMAPClient with gevent Closes #168. --- diff --git a/doc/src/index.rst b/doc/src/index.rst index cc5efc6..c68723c 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -186,6 +186,24 @@ The above examples show some of the most common TLS parameter customisations but there are many other tweaks are possible. Consult the Python 3 :py:mod:`ssl` package documentation for further options. +Using gevent with IMAPClient +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Some extra monkey patching is required to let gevent_ work with +pyOpenSSL (used by IMAPClient for TLS support). The `gevent_openssl`_ +package performs this patching and can be used with IMAPClient like +this:: + + from gevent import monkey; monkey.patch_all() + import gevent_openssl; gevent_openssl.monkey_patch() + + import imapclient + + client = imapclient.IMAPClient(...) + ... + +.. _gevent: http://www.gevent.org/ +.. _`gevent_openssl`: https://pypi.python.org/pypi/gevent_openssl/ + API Reference -------------