Skip to main content

Aliyun TableStore(OTS) SDK

Project description

https://img.shields.io/badge/license-apache2-brightgreen.svg https://badge.fury.io/gh/aliyun%2Faliyun-tablestore-python-sdk.svg https://travis-ci.org/aliyun/aliyun-tablestore-python-sdk.svg

概述

  • 此 Python SDK 基于 阿里云表格存储服务 API 构建。

  • 阿里云表格存储是构建在阿里云飞天分布式系统之上的 NoSQL 数据存储服务,提供海量结构化数据的存储和实时访问。

运行环境

  • 安装 Python 即可运行,支持 python3.8、Python3.9、python3.10、python3.11、python3.12。

安装方法

PIP安装

$ pip install tablestore

Github安装

  1. 下载源码

$ git clone https://github.com/aliyun/aliyun-tablestore-python-sdk.git
  1. 安装

$ python setup.py install

源码安装

  1. 下载 SDK 发布包并解压

  2. 安装

$ python setup.py install

示例代码

表(Table)示例:

多元索引(Search)示例:

执行测试

注意:测试 case 中会有清理某个实例下所有表的动作,所以请使用专门的测试实例来测试。

  1. 测试前准备

$ /bin/bash tests_setup.sh
  1. 安装nosetests

$ pip install nose
  1. 设置执行Case的配置

$ export OTS_TEST_ACCESS_KEY_ID=<your access key id>
$ export OTS_TEST_ACCESS_KEY_SECRET=<your access key secret>
$ export OTS_TEST_ENDPOINT=<tablestore service endpoint>
$ export OTS_TEST_INSTANCE=<tablestore instance name>
  1. 运行case

python3.8、Python3.9、python3.10、python3.11可使用以下命令

$ export PYTHONPATH=$(pwd)/tests:$PYTHONPATH; nosetests tests/

python3.12可使用以下命令

$ /bin/bash tests_run.sh

编译proto文件

$ /bin/bash protoc.sh

贡献代码

  • 我们非常欢迎大家为 Tablestore Python SDK 以及其他 Tablestore SDK 贡献代码。

  • 非常感谢 @Wall-ee 对 4.3.0 版本的贡献。

联系我们

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

tablestore-6.0.0.tar.gz (151.9 kB view details)

Uploaded Source

File details

Details for the file tablestore-6.0.0.tar.gz.

File metadata

  • Download URL: tablestore-6.0.0.tar.gz
  • Upload date:
  • Size: 151.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for tablestore-6.0.0.tar.gz
Algorithm Hash digest
SHA256 55270a59a044a08addc0878abcef5b79d18548247487e51d75c918b311237900
MD5 987a26adf637628137700f380a96c10f
BLAKE2b-256 cbd799199fec4d2a3dce898c0ada0edd215b36c2e877f131552cf7f831507edd

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