Skip to main content

Tarantool connection driver for work with asyncio

Project description

Connector required tarantool version 1.6:

$ pip install gtarantool

Try it example:

import asyncio
import aiotarantool

cnt = 0


@asyncio.coroutine
def insert_job(tnt):
    global cnt

    for it in range(2500):
        cnt += 1
        r = yield from tnt.insert("tester", (cnt, cnt))

loop = asyncio.get_event_loop()

tnt = aiotarantool.connect("127.0.0.1", 3301)
tasks = [asyncio.async(insert_job(tnt))
         for _ in range(40)]

loop.run_until_complete(asyncio.wait(tasks))
loop.close()

Under this scheme the aiotarantool driver makes a smaller number of read/write tarantool socket.

See benchmark results time for insert/select/delete 100K tuples on 1.5KBytes:

call

tarantool

aiotarantool

insert

35.938047

12.701088

select

24.389748

18.158066

delete

35.224515

13.905095

Project details


Download files

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

Source Distribution

aiotarantool-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file aiotarantool-1.0.0.tar.gz.

File metadata

File hashes

Hashes for aiotarantool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1ccfb61d82b1fb195e62ff8dd2a2d3d13b5010967dca8588f2deee0c63ddda54
MD5 fff08473a978d32d6b423d0c7fa7f703
BLAKE2b-256 f72930976dddb95bf217be38d5c83bbb7e7c514c996840e3e5f588fd0663ecd9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page