All Projects → tarantool → tarantool-python

tarantool / tarantool-python

Licence: BSD-2-Clause license
Python driver for Tarantool

Programming Languages

python
139335 projects - #7 most used programming language
lua
6591 projects
Makefile
30231 projects

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

The recommended way to install tarantool package is using PIP

For Tarantool version < 1.6.0 you must get 0.3.* connector version:

$ pip install tarantool\<0.4

For later Tarantool use version 0.5.* connector version:

$ pip install tarantool\>0.4

You can also download zip archive, unpack it and run

$ python setup.py install

To install development version of the package using pip

For Tarantool version < 1.6.0 you must get stable branch:

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

For later Tarantool use master branch:

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

What is Tarantool?

Tarantool is a NoSQL database running inside a Lua program. It combines the network programming power of Node.JS with data persistency capabilities of Redis. It's open source, BSD-2-Clause licensed.

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 - the in-memory storage engine with optional persistence
    • vinyl - the on-disk storage engine to use with large data sets
  • secondary key and index iterators 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.

Look at asynctnt for asynchronous Python driver based on asyncio. See also the feature comparison table.

Run tests

On Linux:

$ python setup.py test

On Windows:

  • Setup a Linux machine with installed tarantool (called remote later).
  • (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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].