Metadata-Version: 1.1
Name: asyncblink
Version: 0.3.2
Summary: 
Signals with coroutines!

Home-page: https://pypi.python.org/pypi/asyncblink
Author: Juca Crispim
Author-email: juca@poraodojuca.net
License: UNKNOWN
Description-Content-Type: UNKNOWN
Description: AsyncBlink is a small extention to Blinker and enables you to use
        coroutines as receivers for your signals.
        
        Install
        =======
        
        Installation is simple, via pip:
        
        .. code-block:: python
        
           $ pip install asyncblink
        
        
        
        Usage
        =====
        
        Usage is simple, too. Create a signal, connect some receivers to it
        and then use the ``send()`` method to trigger all receivers
        
        .. code-block:: python
        
           from asyncblink import signal
           my_signal = signal('nice-signal')
        
           async def coro_receiver(sender, **kwargs):
               # an expensive io operation here
               return 'done'
        
           def receiver(sender):
               return 'ok'
        
           my_signal.connect(coro_receiver)
           my_signal.connect(receiver)
           my_signal.send('some-sender')
        
        
        Using AsyncBlink with tornado coroutines
        ========================================
        
        To use `tornado coroutines <http://www.tornadoweb.org/en/stable/gen.html>`_
        pass a callable that schedules the execution of a future
        using the parameter ``scheduler``:
        
        .. code-block:: python
        
           from tornado import gen, ioloop
        
           @gen.coroutine
           def tornado_coro_receiver(sender, **kwargs):
               # do something
               return 'done'
        
           def scheduler(future):
                loop = ioloop.IOLoop.instance()
                loop.add_future(future, lambda f: f)
        	return future
        
           my_signal = signal('nice-tornado-signal', scheduler=scheduler)
           my_signal.connect(tornado_coro_receiver)
        
        
        Other than that, AsyncBlink's usage is the same as Blinker, Take a look at the
        `Blinker documentation <http://pythonhosted.org/blinker/>`_ for further
        information.
        
        
        Source Code
        ===========
        
        Source code is hosted on `github <https://github.com/jucacrispim/asyncblink>`_.
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides: asyncblink
