Description: |
The psycogreen package enables psycopg2 to work with co-routine libraries,
using asynchronous calls internally but offering a blocking interface so
that regular code can run unmodified. Psycopg offers co-routines support
since release 2.2. Because the main module is a C extension it cannot be
monkey-patched to become co-routine-friendly. Instead it exposes a hook
that co-routine 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 co-routine libraries. |