Skip to main content

Tarantool Queue python/asyncio bindings

Project description

Build Status Coverage Status PyPI

asynctnt-queue is a python/asyncio bindings library for tarantool-queue package in Tarantool Database, integrated with asynctnt module.


Documentation is available here.


Use pip to install:

$ pip install asynctnt-queue

Basic Usage

Tarantool config:

box.cfg {
    listen = ''

box.once('v1', function()
    box.schema.user.grant('guest', 'read,write,execute', 'universe')

queue = require('queue')
queue.create_tube('test_tube', 'fifottl')

Python code:

import asyncio
import asynctnt
import asynctnt_queue

async def run():
    conn = asynctnt.Connection(host='', port=3301)
    await conn.connect()

    queue = asynctnt_queue.Queue(conn)
    test_tube ='test_tube')

    # Add a task to queue
    task = await test_tube.put({
        'key': 'value'

    print('Task id: {}'.format(task.task_id))
    print('Task status: {}'.format(task.status))

    # Retrieve a task from queue
    task = await test_tube.take(1)

    # ... do some work with task

    await task.ack()
    await conn.disconnect()

loop = asyncio.get_event_loop()


  1. Tarantool - in-memory database and application server.
  2. asynctnt - fast Tarantool database connector for Python/asyncio
  3. aiotarantool - alternative Python/asyncio connector

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asynctnt-queue, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size asynctnt-queue-0.0.5.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page