colibri-0.0.1
توضیحات
asyncio-based implementation of AMQP client
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | colibri-0.0.1 |
| نام | colibri |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Dmitry Malinovsky |
| ایمیل نویسنده | damalinov@gmail.com |
| آدرس صفحه اصلی | http://github.com/malinoff/colibri |
| آدرس اینترنتی | https://pypi.org/project/colibri/ |
| مجوز | MIT |
colibri - asyncio-based AMQP client
===================================
Usage example
-------------
::
from asyncio import get_event_loop, coroutine
from colibri import Connection, BasicMessage
@coroutine
def go():
c = Connection()
msg = BasicMessage('test message')
with (yield from c):
channel = c.channel()
with (yield from channel):
yield from channel.exchange_declare('otherex', type='direct')
yield from channel.queue_declare('otherqueue')
yield from channel.queue_bind('otherqueue', 'otherex', 'route')
yield from channel.basic_publish(msg, 'otherex', 'route')
res = yield from channel.basic_get('otherqueue')
print("this is the result: ", res.body)
get_event_loop().run_until_complete(go())
Installation
------------
Using pip:
::
$ pip install colibri
From the source (requires virtualenv or root):
::
$ setup.py install
نحوه نصب
نصب پکیج whl colibri-0.0.1:
pip install colibri-0.0.1.whl
نصب پکیج tar.gz colibri-0.0.1:
pip install colibri-0.0.1.tar.gz