Skip to content

Commit 2320f0f

Browse files
to version 6.2.1: support ak less and SingleColumnRegexCondition filter
1 parent 46d6882 commit 2320f0f

File tree

84 files changed

+4204
-1806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+4204
-1806
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ Tablestore SDK for Python 版本记录
33

44
Python SDK 的版本号遵循 `Semantic Versioning <http://semver.org/>`_ 规则。
55

6+
Version 6.2.1
7+
-------------
8+
- Support SingleColumnRegexCondition filter
9+
10+
Version 6.2.0
11+
-------------
12+
- 支持无 AK 方案,OTSClient 支持 credentials_provider 参数。
13+
- 使用 Poetry 管理项目,提高开发和发布效率。
14+
- Flatc 实时编译 fbs 文件。
15+
- 解决 dataprotocol 包不在 tablestore 项目下面的问题,避免包冲突。
16+
- 优化 ut 测试。
17+
618
Version 6.1.0
719
-------------
820
- Support some timeseries api.

README.rst

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,38 @@ Github安装
3434

3535
1. 下载源码
3636

37-
3837
.. code-block:: bash
3938
4039
$ git clone https://github.com/aliyun/aliyun-tablestore-python-sdk.git
4140
42-
2. 安装
41+
2. 构建 whl (构建好的whl文件在dist目录下)
42+
43+
.. code-block:: bash
44+
45+
$ poetry build
46+
47+
3. 安装
4348

4449
.. code-block:: bash
4550
46-
$ python setup.py install
51+
$ pip install dist/tablestore-{替换为实际版本}-py3-none-any.whl
4752
4853
4954
源码安装
5055
--------
5156

5257
1. 下载 SDK 发布包并解压
53-
2. 安装
58+
2. 构建 whl (构建好的whl文件在dist目录下)
59+
60+
.. code-block:: bash
61+
62+
$ poetry build
5463
64+
3. 安装
5565

5666
.. code-block:: bash
5767
58-
$ python setup.py install
68+
$ pip install dist/tablestore-{替换为实际版本}-py3-none-any.whl
5969
6070
示例代码
6171
---------
@@ -89,19 +99,7 @@ Github安装
8999

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

92-
1. 测试前准备
93-
94-
.. code-block:: bash
95-
96-
$ /bin/bash tests_setup.sh
97-
98-
2. 安装nosetests
99-
100-
.. code-block:: bash
101-
102-
$ pip install nose
103-
104-
3. 设置执行Case的配置
102+
1. 设置执行Case的配置
105103

106104
.. code-block:: bash
107105
@@ -110,25 +108,11 @@ Github安装
110108
$ export OTS_TEST_ENDPOINT=<tablestore service endpoint>
111109
$ export OTS_TEST_INSTANCE=<tablestore instance name>
112110
113-
4. 运行case
114-
115-
python3.8、Python3.9、python3.10、python3.11可使用以下命令
116-
117-
.. code-block:: bash
118-
119-
$ export PYTHONPATH=$(pwd)/tests:$PYTHONPATH; nosetests tests/
120-
121-
python3.12可使用以下命令
122-
123-
.. code-block:: bash
124-
125-
$ /bin/bash tests_run.sh
111+
2. 运行case
126112

127-
编译proto文件
128-
----------------
129113
.. code-block:: bash
130114
131-
$ /bin/bash protoc.sh
115+
$ poetry run pytest tests
132116
133117
贡献代码
134118
--------

bin/flatc-mac-22.9.24/flatc-mac

5.83 MB
Binary file not shown.
8.44 MB
Binary file not shown.
14.3 MB
Binary file not shown.

examples/agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def delete_search_index(index_name):
350350

351351

352352
if __name__ == '__main__':
353-
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE)
353+
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE, region=OTS_REGION)
354354
delete_search_index(index_name)
355355
delete_table()
356356

examples/batch_get_row.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def batch_get_row(client):
7575

7676

7777
if __name__ == '__main__':
78-
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE)
78+
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE, region=OTS_REGION)
7979
delete_table(client, table_name_1)
8080
delete_table(client, table_name_2)
8181

examples/batch_write_row.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def batch_write_row(client):
7777

7878

7979
if __name__ == '__main__':
80-
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE)
80+
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE, region=OTS_REGION)
8181
try:
8282
delete_table(client)
8383
except:

examples/create_timeseries_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def describe_timeseries_table(client: OTSClient):
3939

4040

4141
if __name__ == '__main__':
42-
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE)
42+
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE, region=OTS_REGION)
4343
create_timeseries_table(client)
4444
time.sleep(30)
4545
describe_timeseries_table(client)

examples/delete_row.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def get_row(client):
5151

5252

5353
if __name__ == '__main__':
54-
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE)
54+
client = OTSClient(OTS_ENDPOINT, OTS_ACCESS_KEY_ID, OTS_ACCESS_KEY_SECRET, OTS_INSTANCE, region=OTS_REGION)
5555
try:
5656
delete_table(client)
5757
except:

0 commit comments

Comments
 (0)