SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

python-psycogreen rpm build for : OpenSuSE. For other distributions click python-psycogreen.

Name : python-psycogreen
Version : 1.0 Vendor : obs://build_opensuse_org/home:j-engel
Release : 2.21 Date : 2019-01-30 17:01:59
Group : Development/Languages/Python Source RPM : python-psycogreen-1.0-2.21.src.rpm
Size : 0.02 MB
Packager : (none)
Summary : psycopg2 integration with coroutine libraries
Description :
psycogreen -- psycopg2 integration with coroutine libraries
===========================================================

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.

`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/docs/advanced.html#support-to-coroutine-libraries
.. __: http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.set_wait_callback


Module ``psycogreen.eventlet``
------------------------------

`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.patch_psycopg()``.

Function ``psycogreen.eventlet.patch_psycopg()``
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.

An example script showing concurrent usage of ``psycopg2`` with ``urlopen()``
with Eventlet is available in |tests/test_eventlet.py|__.

.. |tests/test_eventlet.py| replace:: ``tests/test_eventlet.py``
.. __: https://bitbucket.org/dvarrazzo/psycogreen/src/master/tests/test_eventlet.py


Module ``psycogreen.gevent``
----------------------------

In order to use psycopg2 asynchronously with `gevent`_ you can use
``psycogreen.gevent.patch_psycopg()``.

Function ``psycogreen.gevent.patch_psycopg()``
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.

An example script showing concurrent usage of ``psycopg2`` with ``urlopen()``
with gevent is available in |tests/test_gevent.py|__.

.. _gevent: http://www.gevent.org/
.. |tests/test_gevent.py| replace:: ``tests/test_gevent.py``
.. __: https://bitbucket.org/dvarrazzo/psycogreen/src/master/tests/test_gevent.py


uWSGI green threads
-------------------

Roberto De Ioris is writing uGreen__, a green thread implementation on top of
the `uWSGI async platform`__.

.. __: http://projects.unbit.it/uwsgi/wiki/uGreen
.. __: http://projects.unbit.it/uwsgi/

He has performed some tests using both `psycopg2 async support`__ and
`psycopg2 green support`__ and has reported no problem in their stress tests
with both the async styles.

.. __: http://projects.unbit.it/uwsgi/browser/tests/psycopg2_green.py
.. __: http://projects.unbit.it/uwsgi/browser/tests/psycogreen_green.py

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/home:/j-engel/openSUSE_Factory/noarch

Content of RPM  Changelog  Provides Requires

Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server

Provides :
python-psycogreen

Requires :
python(abi) = 2.7
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/python2.7/site-packages/psycogreen
/usr/lib/python2.7/site-packages/psycogreen-1.0-py2.7.egg-info
/usr/lib/python2.7/site-packages/psycogreen-1.0-py2.7.egg-info/PKG-INFO
/usr/lib/python2.7/site-packages/psycogreen-1.0-py2.7.egg-info/SOURCES.txt
/usr/lib/python2.7/site-packages/psycogreen-1.0-py2.7.egg-info/dependency_links.txt
/usr/lib/python2.7/site-packages/psycogreen-1.0-py2.7.egg-info/top_level.txt
/usr/lib/python2.7/site-packages/psycogreen/__init__.py
/usr/lib/python2.7/site-packages/psycogreen/__init__.pyc
/usr/lib/python2.7/site-packages/psycogreen/eventlet.py
/usr/lib/python2.7/site-packages/psycogreen/eventlet.pyc
/usr/lib/python2.7/site-packages/psycogreen/gevent.py
/usr/lib/python2.7/site-packages/psycogreen/gevent.pyc
/usr/share/doc/packages/python-psycogreen
/usr/share/doc/packages/python-psycogreen/COPYING
/usr/share/doc/packages/python-psycogreen/README.rst

 
ICM