aiostomp-1.7.3
توضیحات
Stompt Client for Asyncio applications
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aiostomp-1.7.3 |
| نام | aiostomp |
| نسخه کتابخانه | 1.7.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Pedro Kiefer |
| ایمیل نویسنده | Pedro Kiefer <pedro@kiefer.com.br> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/aiostomp/ |
| مجوز | MIT |
[](https://travis-ci.com/pedrokiefer/aiostomp)
[](https://coveralls.io/github/pedrokiefer/aiostomp?branch=master)
[](https://badge.fury.io/py/aiostomp)
# Aiostomp
Simple asyncio stomp 1.1 client for python 3.6.
Heavely inspired on [torstomp](https://github.com/wpjunior/torstomp).
## Install
with pip:
```bash
pip install aiostomp
```
## Usage
```python
import sys
import logging
import asyncio
from aiostomp import AioStomp
logging.basicConfig(
format="%(asctime)s - %(filename)s:%(lineno)d - "
"%(levelname)s - %(message)s",
level='DEBUG')
async def run():
client = AioStomp('localhost', 61613, error_handler=report_error)
client.subscribe('/queue/channel', handler=on_message)
await client.connect()
client.send('/queue/channel', body=u'Thanks', headers={})
async def on_message(frame, message):
print('on_message:', message)
return True
async def report_error(error):
print('report_error:', error)
def main(args):
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
loop.run_forever()
if __name__ == '__main__':
main(sys.argv)
```
## Development
With empty virtualenv for this project, run this command:
```bash
make setup
```
and run all tests =)
```bash
make test
```
## Contributing
Fork, patch, test, and send a pull request.
نیازمندی
| مقدار | نام |
|---|---|
| - | six |
| - | async-timeout |
| - | mock |
| - | coverage |
| - | asynctest |
| - | pytest |
| - | pytest-cov |
| - | flake8 |
| - | bumpversion |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl aiostomp-1.7.3:
pip install aiostomp-1.7.3.whl
نصب پکیج tar.gz aiostomp-1.7.3:
pip install aiostomp-1.7.3.tar.gz