Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jettify/aiobeanstalk
Beanstalkd message queue client for asyncio.
https://github.com/jettify/aiobeanstalk
Last synced: about 1 month ago
JSON representation
Beanstalkd message queue client for asyncio.
- Host: GitHub
- URL: https://github.com/jettify/aiobeanstalk
- Owner: jettify
- Created: 2014-04-06T17:05:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-04-24T20:23:28.000Z (over 10 years ago)
- Last Synced: 2023-03-11T08:55:57.861Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 258 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
aiobeanstalk
============
.. image:: https://travis-ci.org/jettify/aiobeanstalk.svg?branch=master
:target: https://travis-ci.org/jettify/aiobeanstalk**aiobeanstalk** is a library for accessing beanstalk_ message queue
from the asyncio_ (PEP-3156/tulip) framework. Basicly code ported from awesome
pybeanstalk_ project and their twisted adapter.Library is **not stable** and there are **some tests** .
Example
=======Producer
.. code-block:: python
import asyncio
import aiobeanstalkdef main():
bs = yield from aiobeanstalk.connect(host='localhost', port=11300)data = yield from bs.put('{"nice":"job"}')
print(data)if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_forever()Consumer
.. code-block:: python
import asyncio
import aiobeanstalkdef main():
bs = yield from aiobeanstalk.connect(host='localhost', port=11300)
# wait for job from *default* tube
res_data = yield from bs.reserve()
print(res_data)
status, data = yield from bs.delete(res_data['jid'])
print(data)if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_forever().. _beanstalk: https://github.com/kr/beanstalkd
.. _asyncio: http://docs.python.org/3.4/library/asyncio.html
.. _pybeanstalk: https://github.com/sophacles/pybeanstalkOther Projects
==============
I have learned a lot from this projects, authors have done great work,
give them a try first.* https://github.com/sophacles/pybeanstalk
* https://github.com/kr/beanstalkd
* https://bitbucket.org/nephics/beanstalkt
* https://github.com/earl/beanstalkc