Metadata-Version: 1.0
Name: anypubsub
Version: 0.1
Summary: A generic interface wrapping multiple different backends to provide a consistent pubsub API.
Home-page: http://github.com/simock85/anypubsub
Author: Simone Marzola
Author-email: marzolasimone@gmail.com
License: UNKNOWN
Description: anypubsub
        =========
        
        .. image:: https://travis-ci.org/simock85/anypubsub.png?branch=master
           :target: https://travis-ci.org/simock85/anypubsub
        
        A generic interface wrapping multiple backends to provide a consistent pubsub API.
        
        
        Usage
        ------
        
        Create a pubsub object::
        
            from anypubsub import create_pubsub
            pubsub = create_pubsub('redis')
        
        or create a pubsub object from settings::
        
            from anypubsub import create_pubsub_from_settings
            pubsub = create_pubsub_from_settings({'anypubsub.backend': 'redis'}, prefix='anypubsub.')
        
        Subscribe to a channel::
        
            subscriber = pubsub.subscribe('a_channel')
        
        you can also subscribe to multiple channels::
        
            subscriber = pubsub.subscribe('a_channel', 'b_channel')
        
        the subscriber is an iterator object that returns the next published message at each loop increment, and blocks until
        next message is published.
        
        Publish a message to a channel::
        
            pubsub.publish('a_channel', 'hello world!')
        
            message = next(subscriber)
            assert message == 'hello world!'
        
        Supported backends
        ---------------------
        
        * redis
        * mongodb
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
