dreadatour / tarantool-deque-python

Python bindings for Tarantool 1.6 delayed queue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tarantool-deque-python

Python bindings for Tarantool delayed queue (Tarantool 1.6 ONLY).

Library depends on:

  • tarantool>0.4

Basic usage can be found in tests. Description on every command is in source code.

Big thanks to Eugine Blikh, Dmitriy Shveenkov and Alexandr Emelin.

For install of latest "stable" version type:

# using pip
$ pip install tarantool-deque
# or using easy_install
$ easy_install tarantool-deque

For install bleeding edge type:

$ pip install git+https://github.com/dreadatour/tarantool-deque-python.git

For configuring Deque in Tarantool read manual Here.

Then just import it, create Deque, create Tube, put and take some elements:

>>> from tarantool_queue import Deque
>>> deque = Deque('localhost', 33013, user='test', password='test')
>>> tube = deque.tube('name_of_tube')
>>> tube.put([1, 2, 3])  # put new task in queue
>>> task = tube.take()  # take task from queue
>>> task.data  # read data from it
[1, 2, 3]
>>> task.ack()  # move this task into state DONE
True

About

Python bindings for Tarantool 1.6 delayed queue

License:MIT License


Languages

Language:Python 100.0%