Skip to main content

Library for easy connection to rabbitmq with pika Library

Project description

EasyPikaIot

Library for easy amqp communication via pika lirmbrary

Installation

Use the package manager pip to install foobar.

pip install easypikaio

Usage

from easy_pika.pika_obj import PikaMassenger

# creat connection to rabittmq

PMI = PikaMassenger(username='<str>',password='<str>',host='<int:defualt(5672)>',port,exchange_name='<str>',exchange_type='<extype:defualt(direct)>')

# for create  consume

PMI.run(queue_name='<str>', routing_keys='<list>' ,callback='<function>')

# function callback
def callback(ch, method, properties, body):...
    PMI.connection._channel.basic_ack(method.delivery_tag)

# for publish  message
PMI.send_message(self,routing_key='<str>',data='<str>')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easypikaio-0.0.3.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

easypikaio-0.0.3-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page