Skip to content

tarantool/tarantool-python

Repository files navigation

Python driver for Tarantool

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

Documentation | Downloads | PyPI | GitHub | Issue tracker

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

Download and install

With pip (recommended)

The recommended way to install the tarantool package is using pip.

For Tarantool version < 1.6.0, get the 0.3.* connector version:

$ pip install tarantool\<0.4

For a later Tarantool version, get the 0.5.* connector version:

$ pip install tarantool\>0.4

ZIP archive

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

$ python setup.py install

Development version

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

For Tarantool version < 1.6.0, get the stable branch:

$ pip install git+https://github.com/tarantool/tarantool-python.git@stable

For a later Tarantool version, use the master branch:

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

What is Tarantool?

Tarantool is an in-memory NoSQL database with a Lua application server on board. It combines the network programming power of Node.JS with data persistency capabilities of Redis. It's open-source, licensed under BSD-2-Clause.

Features

  • ANSI SQL, including views, joins, referential and check constraints
  • Lua packages for non-blocking I/O, fibers, and HTTP
  • MsgPack data format and MsgPack-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:

$ python setup.py 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 python setup.py test.

License

BSD-2-Clause. See the LICENSE file.

Packages

No packages published

Contributors 38

Languages