Skip to main content

Python client library for Tarantool

Project description

https://github.com/tarantool/tarantool-python/actions/workflows/testing.yml/badge.svg?branch=master https://github.com/tarantool/tarantool-python/actions/workflows/packing.yml/badge.svg?branch=master

This package is a pure-python client library for Tarantool.

Documentation | Downloads | PyPI | GitHub | Issue tracker

Download and install

With dnf

You can install python3-tarantool RPM package if you use Fedora (34, 35, 36).

Add the repository

$ curl -L https://tarantool.io/OtKysgx/release/2/installer.sh | bash

and then install the package

$ dnf install -y python3-tarantool

With apt

You can install python3-tarantool deb package if you use Debian (10, 11) or Ubuntu (20.04, 22.04).

Add the repository

$ curl -L https://tarantool.io/OtKysgx/release/2/installer.sh | bash

and then install the package

$ apt install -y python3-tarantool

ZIP archive

You can also download zip archive, unpack it and run:

$ make install

Development version

You can also install the development version of the package using pip.

$ pip3 install git+https://github.com/tarantool/tarantool-python.git@master

What is Tarantool?

Tarantool is an in-memory computing platform originally designed by VK and released under the terms of BSD license.

Features

  • ANSI SQL, including views, joins, referential and check constraints

  • Lua packages for non-blocking I/O, fibers, and HTTP

  • MessagePack data format and MessagePack-based client-server protocol

  • Two data engines:

    • memtx – in-memory storage engine with optional persistence

    • vinyl – on-disk storage engine to use with larger data sets

  • Secondary key and index iterator support (can be non-unique and composite)

  • Multiple index types: HASH, BITSET, TREE, RTREE

  • Asynchronous master-master replication

  • Authentication and access control

See More

NOTE

This driver is synchronous, so connection mustn’t be shared between threads/processes.

If you’re looking for an asynchronous Python driver based on asyncio, consider using asynctnt . See also the feature comparison table.

Run tests

On Linux:

$ make test

On Windows:

  • Setup a Linux machine with Tarantool installed. This machine will be referred to as remote in this instruction.

  • (On remote) Copy test/suites/lib/tarantool_python_ci.lua to /etc/tarantool/instances.available.

  • (On remote) Run tarantoolctl start tarantool_python_ci.

  • Set the following environment variables: * REMOTE_TARANTOOL_HOST=..., * REMOTE_TARANTOOL_CONSOLE_PORT=3302.

  • Run make test.

Build docs

To build documentation, first you must install its build requirements:

$ pip3 install -r docs/requirements.txt

Then run

$ make docs

You may host local documentation server with

$ python3 -m http.server --directory build/sphinx/html

Open localhost:8000 in your browser to read the docs.

License

BSD-2-Clause. See the LICENSE file.

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

tarantool-1.2.0.tar.gz (288.9 kB view details)

Uploaded Source

Built Distribution

tarantool-1.2.0-py3-none-any.whl (92.1 kB view details)

Uploaded Python 3

File details

Details for the file tarantool-1.2.0.tar.gz.

File metadata

  • Download URL: tarantool-1.2.0.tar.gz
  • Upload date:
  • Size: 288.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for tarantool-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c8a11585fd0b38105e94ff1c35cffa7e7a13eb4cc36e200c07ec25f238566122
MD5 b9f4824734af762ac6e7f033cbf5f4f4
BLAKE2b-256 9529e1e527f25706723b2fa43aecaebeb3ebb45735813fa4e1f1267c27a4461d

See more details on using hashes here.

File details

Details for the file tarantool-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: tarantool-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 92.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for tarantool-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23389b3500ee7a631c62342253a36e2a29b46b4d6c6f12950b2688a786dee10f
MD5 8a78d1bed4dd1a86e76393d6863737a8
BLAKE2b-256 38a214ff2d8b4bb57b447adcf5d24264791c4d67ac3efeb515b57b6302e898a1

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