<div dir="ltr">rabbitpy 0.5.0, a minimalistic, thread-safe, pythonic RabbitMQ client library is now available on pypi:<div><br></div><div><a href="https://pypi.python.org/pypi/rabbitpy" target="_blank">https://pypi.python.org/pypi/rabbitpy</a><br>
</div><div><br></div><div>Documentation is available at <a href="http://rabbitpy.readthedocs.org" target="_blank">http://rabbitpy.readthedocs.org</a></div><div><br></div><div><b>Highlights</b></div><div><br></div><div>- Simple, blocking Pythonic API</div>
<div>- A thread-based connection and IO management system that properly supports AMQP 0.9.1 server to client RPC semantics.</div><div>- Support for Python 2.6, 2.7, 3.2 and 3.3</div><div>- Support for the up-coming Connection.Blocked feature in RabbitMQ:�<a href="http://next.rabbitmq.com/connection-blocked.html" target="_blank">http://next.rabbitmq.com/connection-blocked.html</a></div>
<div><br></div><div><b>Examples of Use</b></div><div><br></div><div>A simple publisher for one-off message publishing:</div><div><br></div><div><div><font face="courier new, monospace">� � >>> rabbitpy.publish('amqp://guest:guest@localhost:5672/%2f',</font></div>
<div><font face="courier new, monospace">� � � � � � � � � � � � �exchange='test',</font></div>
<div><font face="courier new, monospace">� � � � � � � � � � � � �routing_key='example',</font></div><div><font face="courier new, monospace">� � � � � � � � � � � � �body='This is my test message',</font></div>
<div><font face="courier new, monospace">� � � � � � � � � � � � �properties={'content_type': 'text/plain'})</font></div>
</div><div><br></div><div>A simple consumer:</div><div><br></div><div><div><font face="courier new, monospace">� � >>> with rabbitpy.consume('amqp://guest:guest@localhost:5672/%2f', 'test') as c:</font></div>
<div><font face="courier new, monospace">� � .. � �for message in c.next_message():</font></div><div><font face="courier new, monospace">� � ... � � � � print message.properties['message_id']</font></div>
<div><font face="courier new, monospace">� � ... � � � � print message.body</font></div><div><font face="courier new, monospace">� � ... � � � � message.ack()</font></div><div><font face="courier new, monospace">� � ...</font></div>
<div><font face="courier new, monospace">� � 856dfdc7-5ee3-4fc1-9635-977bf0043a9f</font></div><div><font face="courier new, monospace">� � {"foo": "bar"}</font></div></div><div><br></div><div>And a more complete consumer example:</div>
<div><br></div><div><div>� � import rabbitpy</div><div><font face="courier new, monospace">� � with rabbitpy.Connection('amqp://guest:guest@localhost:5672/%2f') as conn:</font></div><div><font face="courier new, monospace">� � � � with conn.channel() as channel:</font></div>
<div><font face="courier new, monospace">� � � � � � queue = rabbitpy.Queue(channel, 'example')</font></div><div><font face="courier new, monospace">� � � � � � with queue.consumer() as consumer:</font></div><div>
<font face="courier new, monospace">� � � � � � � � for message in consumer.next_message():</font></div><div><font face="courier new, monospace">� � � � � � � � � � print('Message:')</font></div><div><font face="courier new, monospace">� � � � � � � � � � print</font><span style="font-family:'courier new',monospace">(</span><span style="font-family:'courier new',monospace">' Time: %s' % message.properties['timestamp'])</span></div>
<div><font face="courier new, monospace">� � � � � � � � � � print</font><span style="font-family:'courier new',monospace">(</span><span style="font-family:'courier new',monospace">' Body: %s' % message.body)</span></div>
<div><font face="courier new, monospace">� � � � � � � � � � message.ack()</font></div></div><div><br></div><div><br></div><div><b>Development Status</b></div><div><br></div>
<div>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!�</div>
<div><br></div><div>Please report any bugs to�<a href="https://github.com/gmr/rabbitpy/issues" target="_blank">https://github.com/gmr/rabbitpy/issues</a></div><div><br></div><div>Regards,</div><div><br>Gavin</div></div>