Metadata-Version: 1.1
Name: greenify
Version: 0.3.4
Summary: Make C module compatible with gevent at runtime.
Home-page: https://github.com/douban/greenify
Author: Zhongbo Tian
Author-email: tianzhongbo@douban.com
License: UNKNOWN
Download-URL: https://github.com/douban/greenify/archive/0.3.4.tar.gz
Description: greenify_
        =========
        
        greenify_ can make Python extension modules having network operations in C
        code to be compatible with gevent_.
        
        greenify_ uses the Dynamic Function Redirecting technique same as ELF-Hook_ 
        to patch blocking network operations at runtime, without the need modify
        the original modules.
        
        Currently greenify_ only supports ELF format modules, and is tested on Linux.
        
        Build status
        ------------
        
        - Branch **master** : |travis_master|
        
        .. |travis_master| image:: https://travis-ci.org/douban/greenify.svg?branch=master
            :target: https://travis-ci.org/douban/greenify
        
        Install from source
        -------------------
        
        ``greenify`` module is installed using setuptools or pip::
        
          python setup.py install
        
        or::
        
          pip install greenify
        
        Usage
        -----
        
        1. Active greenify_ before initiate environment::
        
            import greenify
            greenify.greenify()
        
        2. Make sure the dynamic module(e.g. libmemcached) is patched before using::
        
            assert greenify.patch_lib('/usr/lib/libmemcached.so')
        
        3. Import and use the corresponding module, which is now gevent_ compatible.
        
        Thread Safety
        -------------
        
        Once activated, the green C functions will, on potentially blocking operation,
        pass control to gevent's main event loop, which may switch to other ready
        greenlet which is also in one of the green functions.  So, make sure your C
        code can handle this kind of execution pause and resume.  A thread safe
        program usually is ready for greenify, but remember that all the switches
        happen in a single thread.
        
        
        License
        -------
        
        greenify_ is written and maintained by `douban`_ and is licensed under New BSD license.
        
        
        .. _gevent: http://www.gevent.org
        .. _greenify: https://github.com/douban/greenify
        .. _douban: http://www.douban.com
        .. _ELF-Hook: https://github.com/shoumikhin/ELF-Hook
        
Platform: Linux
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Cython
Classifier: Programming Language :: C
Classifier: Topic :: Software Development :: Libraries
