Pika is a pure-Python implementation of the AMQP 0-9-1 protocol that tries to stay fairly independent of the underlying network support library.

Pika’s documentation can be found at https://pika.readthedocs.org

Example

Here is the most simple example of use, sending a message with the BlockingConnection adapter:

import pika connection = pika . BlockingConnection () channel = connection . channel () channel . basic_publish ( exchange = 'example' , routing_key = 'test' , body = 'Test Message' ) connection . close ()

And an example of writing a blocking consumer: