Registry / database / tablestore

tablestore

JSON →
library6.4.6pypypi✓ verified 83d ago

The official Python SDK for Alibaba Cloud TableStore (formerly OTS), a distributed NoSQL database. Current version 6.4.6 supports Python >=3.8 and <4.0. Released roughly every few months with backwards compatibility improvements.

pip install tablestore
INSTALL
IMPORT
SIG · TABLESTORE
T
tablestore
databasepythonv6.4.6
Install
7.5s avg
Import
1400ms
Disk
122MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.4.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.706s · 120.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.5s · import 1.094s · 119MB
122MB installed
● package 122MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OTSClient
from tablestore import OTSClient
from ots import OTSClient
Old package name was 'ots'; renamed to 'tablestore' in v4.

Initialize OTSClient and list existing tables.

from tablestore import OTSClient endpoint = os.environ.get('OTS_ENDPOINT', '') access_key_id = os.environ.get('OTS_ACCESS_KEY_ID', '') access_key_secret = os.environ.get('OTS_ACCESS_KEY_SECRET', '') instance_name = os.environ.get('OTS_INSTANCE_NAME', '') client = OTSClient(endpoint, access_key_id, access_key_secret, instance_name) # List tables tables = client.list_table() print(tables)
Debug
Known issues
breakingVersion 4.0 renamed the package from 'ots' to 'tablestore'. All imports must use 'tablestore' instead of 'ots'.
fix
Replace 'import ots' with 'import tablestore' and update all references.
affects: >=4.0
breakingIn v4+ the client class changed from 'OTSClient' in 'ots' to 'OTSClient' in 'tablestore'. Old code using 'ots.OTSClient' will fail.
fix
Use 'from tablestore import OTSClient' instead.
affects: >=4.0
deprecatedThe 'write_row' method is deprecated in favor of 'put_row' as of v5.0.
fix
Replace 'client.write_row(table, row)' with 'client.put_row(table, row)'.
affects: 5.0 - 6.x
gotchaThe SDK requires the 'crcmod' library for data integrity checks. If not installed, clients may silently fall back to a slower Python CRC implementation or raise an import error.
fix
Install crcmod: pip install crcmod.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ots'
The package was renamed from 'ots' to 'tablestore' in v4.
fix
Install with 'pip install tablestore' and update imports: 'from tablestore import ...'.
AttributeError: module 'tablestore' has no attribute 'OTSClient'
The symbol 'OTSClient' might have been imported incorrectly. In older docs it was 'ots.OTSClient'.
fix
Use correct import: 'from tablestore import OTSClient'.
tablestore.error.OTSServiceError: RequestTimeTooSkewed
The client machine's clock is not synchronized with Alibaba Cloud servers.
fix
Run NTP sync (e.g., 'sudo ntpdate ntp.aliyun.com') or set correct timezone.
Upgrade
Version history
6.4.6latest on PyPI · released Apr 28, 2026
Audit
Dependencies
crcmodoptionalRequired for CRC32 checksum computation in data integrity checks.
protobufoptionalUsed for serialization of request/response objects (version 3.x or 4.x).
Agent activity
25 hits · last 30 days
node
20
Meta
2
OpenAI (training)
1
Resources
tablestore — pip install tablestore · libregistry