Daniele Varrazzo avatar Daniele Varrazzo committed be6cd3a

Improvements to the README

Comments (0)

Files changed (1)

 psycogreen -- integrating psycopg2 with coroutine libraries
 ===========================================================
 
-The `psycogreen`_ package is a contained of callbacks to make psycopg2 work
-with coroutine libraries, using asynchronous calls internally but offering a
-blocking interface so that regular code can run unmodified.
+The `psycogreen`_ package enables psycopg2 to work with coroutine libraries,
+using asynchronous calls internally but offering a blocking interface so that
+regular code can run unmodified.
 
-Since `release 2.2`__, `Psycopg`_ offers `coroutines support`__.
-
-Psycopg is a C extension module, so it cannot be monkey-patched to become
+`Psycopg`_ offers `coroutines support`__ since release 2.2. Because the main
+module is a C extension it cannot be monkey-patched to become
 coroutine-friendly. Instead it exposes `a hook`__ that coroutine libraries can
 use to install a function integrating with their event scheduler. Psycopg will
 call the function whenever it executes a libpq call that may block.
 `psycogreen` is a collection of "wait callbacks" useful to integrate Psycopg
 with different coroutine libraries.
 
-
 .. _psycogreen: https://bitbucket.org/dvarrazzo/psycogreen
 .. _Psycopg: http://initd.org/psycopg/
-.. __: http://initd.org/psycopg/articles/2010/05/16/psycopg-220-released/
 .. __: http://initd.org/psycopg/docs/advanced.html#support-to-coroutine-libraries
 .. __: http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.set_wait_callback
 
 Module ``psycogreen.eventlet``
 ------------------------------
 
-`Eventlet`_ support Psycopg out-of-the-box: Psycopg can be patched together
-with the standard library: see `the documentation`__.
+`Eventlet`_ currently supports Psycopg out-of-the-box and ``psycogreen`` is not
+necessary. See `the documentation`__ for patching instruction.
 
 .. _Eventlet: http://eventlet.net/
 .. __: http://eventlet.net/doc/patching.html#monkeypatching-the-standard-library
 If for any reason you want to avoid using Eventlet monkeypatching you can use
 ``psycogreen.eventlet.make_psycopg_green()``.
 
+Function ``psycogreen.eventlet.make_psycopg_green()``
+    Enable async processing in Psycopg integrated with the Eventlet events
+    loop.  It is performed by registering ``eventlet_wait_callback()`` as
+    psycopg2 wait callback.
+
 Function ``psycogreen.eventlet.eventlet_wait_callback(conn)``
     A wait callback integrating with Eventlet events loop.
 
-Function ``psycogreen.eventlet.make_psycopg_green()``
-    Register ``eventlet_wait_callback()`` into psycopg2
-
 An example script showing concurrent usage of ``psycopg2`` with ``urlopen()``
 with Eventlet is available in |tests/test_eventlet.py|__.
 
 In order to use psycopg2 asynchronously with `gevent`_ you can use
 ``psycogreen.gevent.make_psycopg_green()``.
 
+Function ``psycogreen.gevent.make_psycopg_green()``
+    Enable async processing in Psycopg integrated with the gevent events
+    loop.  It is performed by registering ``gevent_wait_callback()`` as
+    psycopg2 wait callback.
+
 Function ``psycogreen.gevent.gevent_wait_callback(conn)``
     A wait callback integrating with gevent events loop.
 
-Function ``psycogreen.gevent.make_psycopg_green()``
-    Register ``gevent_wait_callback()`` into psycopg2
-
 An example script showing concurrent usage of ``psycopg2`` with ``urlopen()``
 with gevent is available in |tests/test_gevent.py|__.
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.