https://github.com/tarantool/queue-python
Python Bindings for Tarantool Queue (https://github.com/tarantool/queue/)
https://github.com/tarantool/queue-python
Last synced: 3 months ago
JSON representation
Python Bindings for Tarantool Queue (https://github.com/tarantool/queue/)
- Host: GitHub
- URL: https://github.com/tarantool/queue-python
- Owner: tarantool
- License: mit
- Created: 2013-10-18T16:52:01.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T12:18:49.000Z (almost 7 years ago)
- Last Synced: 2025-03-28T04:03:54.074Z (over 1 year ago)
- Language: Python
- Size: 62.5 KB
- Stars: 14
- Watchers: 40
- Forks: 11
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
============
queue-python
============
Python Bindings for `Tarantool Queue `_.
Library depends on:
* msgpack-python
* tarantool
Basic usage can be found in tests. Description on every command is in source code.
Big thanks to Dmitriy Shveenkov and `Alexandr (FZambia) Emelin `_.
For install of latest "stable" version type:
.. code-block:: bash
# using pip
$ sudo pip install tarantool-queue
# or using easy_install
$ sudo easy_install tarantool-queue
# or using python
$ wget http://bit.ly/tarantool_queue -O tarantool_queue.tar.gz
$ tar xzf tarantool_queue.tar.gz
$ cd tarantool-queue-{version}
$ sudo python setup.py install
For install bleeding edge type:
.. code-block:: bash
$ sudo pip install git+https://github.com/tarantool/queue-python.git
For configuring Queue in `Tarantool `_ read manual `Here `_.
Then just **import** it, create **Queue**, create **Tube**, **put** and **take** some elements:
.. code-block:: python
>>> from tarantool_queue import Queue
>>> queue = Queue("localhost", 33013, 0)
>>> tube = queue.tube("name_of_tube")
>>> tube.put([1, 2, 3])
Not taken task instance
>>> task = tube.take()
>>> task.data # take task and read data from it
[1, 2, 3]
>>> task.ack() # move this task into state DONE
True
That's all, folks!
See Also
========
* `Documentation `_
* `Quick Start `_
* `Queue API `_