[rabbitmq-discuss] rabbitpy 0.5.0 released

Gavin M. Roy gavinmroy at gmail.com
Tue Sep 24 00:11:25 BST 2013


rabbitpy 0.5.0, a minimalistic, thread-safe, pythonic RabbitMQ client
library is now available on pypi:

https://pypi.python.org/pypi/rabbitpy

Documentation is available at http://rabbitpy.readthedocs.org

*Highlights*

- Simple, blocking Pythonic API
- A thread-based connection and IO management system that properly supports
AMQP 0.9.1 server to client RPC semantics.
- Support for Python 2.6, 2.7, 3.2 and 3.3
- Support for the up-coming Connection.Blocked feature in RabbitMQ:
http://next.rabbitmq.com/connection-blocked.html

*Examples of Use*

A simple publisher for one-off message publishing:

    >>> rabbitpy.publish('amqp://guest:guest@localhost:5672/%2f',
                         exchange='test',
                         routing_key='example',
                         body='This is my test message',
                         properties={'content_type': 'text/plain'})

A simple consumer:

    >>> with rabbitpy.consume('amqp://guest:guest@localhost:5672/%2f',
'test') as c:
    ..    for message in c.next_message():
    ...         print message.properties['message_id']
    ...         print message.body
    ...         message.ack()
    ...
    856dfdc7-5ee3-4fc1-9635-977bf0043a9f
    {"foo": "bar"}

And a more complete consumer example:

    import rabbitpy
    with rabbitpy.Connection('amqp://guest:guest@localhost:5672/%2f') as
conn:
        with conn.channel() as channel:
            queue = rabbitpy.Queue(channel, 'example')
            with queue.consumer() as consumer:
                for message in consumer.next_message():
                    print('Message:')
                    print(' Time: %s' % message.properties['timestamp'])
                    print(' Body: %s' % message.body)
                    message.ack()


*Development Status*

This library is still considered experimental, but the API is set is not
expected to change. Barring any bug-fix releases, the next version (0.6.0)
will be move the library from alpha development status to beta. Testers are
needed!

Please report any bugs to https://github.com/gmr/rabbitpy/issues

Regards,

Gavin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130923/993ff45b/attachment.htm>


More information about the rabbitmq-discuss mailing list