Tarantool 1.6数据库的Python客户端库
tarantool的Python项目详细描述
这个包是用于Tarantool的纯python客户机库。
DocumentationDownloadsPyPIGitHubIssue tracker
下载并安装
安装tarantool包的推荐方法是使用pip
对于tarantool版本<;1.6.0,您必须获得0.3.*连接器版本:
$ pip install tarantool\<0.4
对于以后的tarantool,请使用0.5.*连接器版本:
$ pip install tarantool\>0.4
您还可以下载zip存档文件,将其解压缩并运行
$ python setup.py install
使用pip
安装软件包的开发版本对于tarantool版本<;1.6.0,您必须获得stablebranch:
$ pip install git+https://github.com/tarantool/tarantool-python.git@stable
供以后使用masterbranch:
$ pip install git+https://github.com/tarantool/tarantool-python.git@master
塔兰托是什么?
Tarantool是在lua程序中运行的nosql数据库。它结合了 具有数据持久性的node.js的网络编程能力 雷迪斯。它是开源的,BSD licensed。
功能
- Lua packages for non-blocking I/O, fibers and HTTP
- MsgPack data format and MsgPack based client-server protocol
- Two data engines:
- 100% in-memory with optional persistence
- 2-level disk-based B-tree, to use with large data sets (powered by Sophia)
- secondary key and index iterators support (can be non-unique and composite)
- multiple index types: HASH, BITSET, TREE
- asynchronous master-master replication
- authentication and access control
注
这个驱动程序是同步的,所以不能在线程/进程之间共享连接。
运行测试
在Linux上:
$ python setup.py test
在Windows上:
- 用已安装的tarantool(稍后称为remote)安装Linux计算机。
- (在remote上)将unit/suites/lib/tarantool_python_ci.lua复制到 /etc/tarantool/instances.available。
- (在remote上)运行tarantoolctl start tarantool_python_ci。
- 设置以下环境变量: *REMOTE_TARANTOOL_HOST=..., *REMOTE_TARANTOOL_CONSOLE_PORT=3302。
- 运行python setup.py test。