Skip to main content

asynctnt-queue

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

Documentation is available here.

Installation

Use pip to install:

$ pip install asynctnt-queue

Basic Usage

Tarantool config:

box.cfg {
    listen = '127.0.0.1:3301'
}

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

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='127.0.0.1', port=3301)
    await conn.connect()

    queue = asynctnt_queue.Queue(conn)
    test_tube = queue.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()
loop.run_until_complete(run())

References

  1. Tarantool - in-memory database and application server.

  2. asynctnt - fast Tarantool database connector for Python/asyncio

  3. aiotarantool - alternative Python/asyncio connector

Metadata

Release files for asynctnt-queue 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asynctnt-queue 0.0.5
File Size Uploaded Provenance Actions
asynctnt-queue-0.0.5.tar.gz 11.5 kB Without provenance Details for asynctnt-queue-0.0.5.tar.gz

Release files / asynctnt-queue-0.0.5.tar.gz

Download URL asynctnt-queue-0.0.5.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
052ce40e031d1e8549242d11c7bd9dd8e84a43cdbb58efcc2bbf9c1fe5e84de5
BLAKE2b-256 checksum
How to use checksums
d4cc578937f323d3950ad758008c123a7d35c3c23de0116e4de6e78cecad0fa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for asynctnt-queue 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page