@@ -15,13 +15,13 @@ Aliyun Tablestore SDK for Python
15
15
概述
16
16
----
17
17
18
- - 此Python SDK基于 `阿里云表格存储服务 <http://www.aliyun.com/product/ots/ >`_ API 构建。
18
+ - 此 Python SDK 基于 `阿里云表格存储服务 <http://www.aliyun.com/product/ots/ >`_ API 构建。
19
19
- 阿里云表格存储是构建在阿里云飞天分布式系统之上的 NoSQL 数据存储服务,提供海量结构化数据的存储和实时访问。
20
20
21
21
运行环境
22
22
---------
23
23
24
- - 安装Python即可运行,支持python2.6、Python2.7 、python3.3 、python3.4 、python3.5 和 python3.6 。
24
+ - 安装 Python 即可运行,支持 python3.8、Python3.9 、python3.10 、python3.11 、python3.12 。
25
25
26
26
安装方法
27
27
---------
@@ -53,7 +53,7 @@ Github安装
53
53
源码安装
54
54
--------
55
55
56
- 1. 下载SDK发布包并解压
56
+ 1. 下载 SDK 发布包并解压
57
57
2. 安装
58
58
59
59
@@ -64,6 +64,8 @@ Github安装
64
64
示例代码
65
65
---------
66
66
67
+ 表(Table)示例:
68
+
67
69
- `表操作(表的创建、获取、更新和删除) <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/table_operations.py >`_
68
70
- `单行写(向表内写入一行数据) <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/put_row.py >`_
69
71
- `单行读(从表内读出一样数据) <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/get_row.py >`_
@@ -77,45 +79,70 @@ Github安装
77
79
- `局部事务(提交事务) <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/transaction_and_commit.py >`_
78
80
- `局部事务(舍弃事务) <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/transaction_and_abort.py >`_
79
81
80
- - `Search <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/search_index.py >`_
81
- - `Parallel Scan <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/parallel_scan.py >`_
82
- - `Max/Min/Sum/Avg/Count/DistinctCount/Percentiles <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/agg.py >`_
83
- - `GroupBy/Histogram <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/group_by.py >`_
84
- - `SQL <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/sql_query.py >`_
82
+ 多元索引(Search)示例:
85
83
84
+ - `基础搜索 <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/search_index.py >`_
85
+ - `并发圈选数据 <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/parallel_scan.py >`_
86
+ - `全文检索 <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/full_text_search.py >`_
87
+ - `向量检索 <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/parallel_scan.py >`_
88
+ - `Max/Min/Sum/Avg/Count/DistinctCount 等 <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/agg.py >`_
89
+ - `GroupBy/Histogram 等 <https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/examples/group_by.py >`_
86
90
87
91
执行测试
88
92
---------
89
93
90
- **注意:测试case中会有清理某个实例下所有表的动作,所以请使用专门的测试实例来测试。 **
94
+ **注意:测试 case 中会有清理某个实例下所有表的动作,所以请使用专门的测试实例来测试。 **
95
+
96
+ 1. 测试前准备
97
+
98
+ .. code-block :: bash
99
+
100
+ $ /bin/bash tests_setup.sh
91
101
92
- 1 . 安装nosetests
102
+ 2 . 安装nosetests
93
103
94
104
.. code-block :: bash
95
105
96
106
$ pip install nose
97
107
98
- 2 . 设置执行Case的配置
108
+ 3 . 设置执行Case的配置
99
109
100
110
.. code-block :: bash
101
111
102
- $ export OTS_TEST_ACCESS_KEY_ID=< your access id>
103
- $ export OTS_TEST_ACCESS_KEY_SECRET=< your access key>
112
+ $ export OTS_TEST_ACCESS_KEY_ID=< your access key id>
113
+ $ export OTS_TEST_ACCESS_KEY_SECRET=< your access key secret >
104
114
$ export OTS_TEST_ENDPOINT=< tablestore service endpoint>
105
- $ export OTS_TEST_INSTANCE=< your instance name>
115
+ $ export OTS_TEST_INSTANCE=< tablestore instance name>
116
+
117
+ 4. 运行case
106
118
107
- 2. 运行case
119
+ python3.8、Python3.9、python3.10、python3.11可使用以下命令
108
120
109
121
.. code-block :: bash
110
122
111
- $ nosetests tests/
123
+ $ export PYTHONPATH=$( pwd) /tests:$PYTHONPATH ; nosetests tests/
124
+
125
+ python3.12可使用以下命令
126
+
127
+ .. code-block :: bash
128
+
129
+ $ /bin/bash tests_run.sh
130
+
131
+ 编译proto文件
132
+ ----------------
133
+ .. code-block :: bash
134
+
135
+ $ /bin/bash protoc.sh
112
136
113
137
贡献代码
114
138
--------
115
- - 我们非常欢迎大家为Tablestore Python SDK以及其他Tablestore SDK贡献代码 。
116
- - 非常感谢 `@Wall-ee <https://github.com/Wall-ee >`_ 对4 .3.0版本的贡献 。
139
+ - 我们非常欢迎大家为 Tablestore Python SDK 以及其他 Tablestore SDK 贡献代码 。
140
+ - 非常感谢 `@Wall-ee <https://github.com/Wall-ee >`_ 对 4 .3.0 版本的贡献 。
117
141
118
142
联系我们
119
143
--------
120
- - `阿里云Tablestore官方网站 <http://www.aliyun.com/product/ots >`_
144
+ - `阿里云 Tablestore 官方网站 <http://www.aliyun.com/product/ots >`_
121
145
- `阿里云官网联系方式 <https://help.aliyun.com/document_detail/61890.html >`_
146
+ - `阿里云 Tablestore 官方文档 <https://help.aliyun.com/zh/tablestore/product-overview >`_
147
+
148
+
0 commit comments