import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(
'localhost'))
channel = connection.channel()
channel.queue_delete(queue='queue-name')
connection.close()
Install pika package as follows
$ sudo pip install pika==0.9.8
The installation depends on pip and git-core packages, you may need to install them first.
On Ubuntu:
$ sudo apt-get install python-pip git-core
On Debian:
$ sudo apt-get install python-setuptools git-core
$ sudo easy_install pip
On Windows: To install easy_install, run the MS Windows Installer for setuptools
> easy_install pip
> pip install pika==0.9.8