tamar-file-hub-client 0.0.11__py3-none-any.whl → 0.0.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- file_hub_client/services/taple/async_taple_service.py +14 -2
- file_hub_client/services/taple/base_taple_service.py +13 -1
- file_hub_client/services/taple/sync_taple_service.py +14 -2
- {tamar_file_hub_client-0.0.11.dist-info → tamar_file_hub_client-0.0.12.dist-info}/METADATA +1 -1
- {tamar_file_hub_client-0.0.11.dist-info → tamar_file_hub_client-0.0.12.dist-info}/RECORD +7 -7
- {tamar_file_hub_client-0.0.11.dist-info → tamar_file_hub_client-0.0.12.dist-info}/WHEEL +0 -0
- {tamar_file_hub_client-0.0.11.dist-info → tamar_file_hub_client-0.0.12.dist-info}/top_level.txt +0 -0
@@ -2058,7 +2058,7 @@ class AsyncTapleService(BaseTapleService):
|
|
2058
2058
|
"""
|
2059
2059
|
from ...rpc.gen import taple_service_pb2, taple_service_pb2_grpc
|
2060
2060
|
from ...schemas.taple import TableViewResponse
|
2061
|
-
|
2061
|
+
|
2062
2062
|
|
2063
2063
|
stub = await self.client.get_stub(taple_service_pb2_grpc.TapleServiceStub)
|
2064
2064
|
|
@@ -2166,7 +2166,19 @@ class AsyncTapleService(BaseTapleService):
|
|
2166
2166
|
from google.protobuf.json_format import MessageToDict
|
2167
2167
|
|
2168
2168
|
# 处理 visible_columns 的转换
|
2169
|
-
|
2169
|
+
if proto_view.HasField('visible_columns'):
|
2170
|
+
visible_columns_dict = MessageToDict(proto_view.visible_columns)
|
2171
|
+
# 如果服务器返回的是旧格式(包含 items 字段的结构),需要转换
|
2172
|
+
if isinstance(visible_columns_dict, dict) and 'items' in visible_columns_dict:
|
2173
|
+
# 旧格式:将列表转换为字典,默认所有列都显示
|
2174
|
+
if isinstance(visible_columns_dict['items'], list):
|
2175
|
+
visible_columns = {col: True for col in visible_columns_dict['items']}
|
2176
|
+
else:
|
2177
|
+
visible_columns = visible_columns_dict
|
2178
|
+
else:
|
2179
|
+
visible_columns = visible_columns_dict
|
2180
|
+
else:
|
2181
|
+
visible_columns = None
|
2170
2182
|
|
2171
2183
|
return TableView(
|
2172
2184
|
id=proto_view.id,
|
@@ -159,7 +159,19 @@ class BaseTapleService(IdempotentTapleMixin):
|
|
159
159
|
config = MessageToDict(proto_view.config) if proto_view.HasField('config') else {}
|
160
160
|
filter_criteria = MessageToDict(proto_view.filter_criteria) if proto_view.HasField('filter_criteria') else None
|
161
161
|
sort_criteria = MessageToDict(proto_view.sort_criteria) if proto_view.HasField('sort_criteria') else None
|
162
|
-
|
162
|
+
if proto_view.HasField('visible_columns'):
|
163
|
+
visible_columns_dict = MessageToDict(proto_view.visible_columns)
|
164
|
+
# 如果服务器返回的是旧格式(包含 items 字段的结构),需要转换
|
165
|
+
if isinstance(visible_columns_dict, dict) and 'items' in visible_columns_dict:
|
166
|
+
# 旧格式:将列表转换为字典,默认所有列都显示
|
167
|
+
if isinstance(visible_columns_dict['items'], list):
|
168
|
+
visible_columns = {col: True for col in visible_columns_dict['items']}
|
169
|
+
else:
|
170
|
+
visible_columns = visible_columns_dict
|
171
|
+
else:
|
172
|
+
visible_columns = visible_columns_dict
|
173
|
+
else:
|
174
|
+
visible_columns = None
|
163
175
|
group_criteria = MessageToDict(proto_view.group_criteria) if proto_view.HasField('group_criteria') else None
|
164
176
|
|
165
177
|
return TableView(
|
@@ -2033,7 +2033,7 @@ class SyncTapleService(BaseTapleService):
|
|
2033
2033
|
"""
|
2034
2034
|
from ...rpc.gen import taple_service_pb2, taple_service_pb2_grpc
|
2035
2035
|
from ...schemas.taple import TableViewResponse
|
2036
|
-
|
2036
|
+
|
2037
2037
|
|
2038
2038
|
stub = self.client.get_stub(taple_service_pb2_grpc.TapleServiceStub)
|
2039
2039
|
|
@@ -2141,7 +2141,19 @@ class SyncTapleService(BaseTapleService):
|
|
2141
2141
|
from google.protobuf.json_format import MessageToDict
|
2142
2142
|
|
2143
2143
|
# 处理 visible_columns 的转换
|
2144
|
-
|
2144
|
+
if proto_view.HasField('visible_columns'):
|
2145
|
+
visible_columns_dict = MessageToDict(proto_view.visible_columns)
|
2146
|
+
# 如果服务器返回的是旧格式(包含 items 字段的结构),需要转换
|
2147
|
+
if isinstance(visible_columns_dict, dict) and 'items' in visible_columns_dict:
|
2148
|
+
# 旧格式:将列表转换为字典,默认所有列都显示
|
2149
|
+
if isinstance(visible_columns_dict['items'], list):
|
2150
|
+
visible_columns = {col: True for col in visible_columns_dict['items']}
|
2151
|
+
else:
|
2152
|
+
visible_columns = visible_columns_dict
|
2153
|
+
else:
|
2154
|
+
visible_columns = visible_columns_dict
|
2155
|
+
else:
|
2156
|
+
visible_columns = None
|
2145
2157
|
|
2146
2158
|
return TableView(
|
2147
2159
|
id=proto_view.id,
|
@@ -38,10 +38,10 @@ file_hub_client/services/folder/__init__.py,sha256=vGbMOlNiEBdnWZB1xE74RJtoroI28
|
|
38
38
|
file_hub_client/services/folder/async_folder_service.py,sha256=uFEmtW8EXYvaKYT2JCitWbdTGR1EtHlx_eBN5P3JUZg,7293
|
39
39
|
file_hub_client/services/folder/sync_folder_service.py,sha256=T00k1nD0txjOFQXxeIbF_ZOkNUhsBF45sDxyaDk8rf8,7167
|
40
40
|
file_hub_client/services/taple/__init__.py,sha256=AQgYVRXgISye8cRd0J5QEK-5AoepeAw5726esFzs2Gg,199
|
41
|
-
file_hub_client/services/taple/async_taple_service.py,sha256=
|
42
|
-
file_hub_client/services/taple/base_taple_service.py,sha256=
|
41
|
+
file_hub_client/services/taple/async_taple_service.py,sha256=XZqMBN69FSJ8-n0nyIfqmjKG_ROpW57qPiB3RJ5FJK8,88859
|
42
|
+
file_hub_client/services/taple/base_taple_service.py,sha256=m_RZjvlXD8CzsB4gtZWDKiL7TNYYtRuSeY4yrFDnGIs,15842
|
43
43
|
file_hub_client/services/taple/idempotent_taple_mixin.py,sha256=lZeMF59dU-KVnc2p7epGrclidCv0nYg8TP_qVUezJ48,4295
|
44
|
-
file_hub_client/services/taple/sync_taple_service.py,sha256=
|
44
|
+
file_hub_client/services/taple/sync_taple_service.py,sha256=LIfpJjZjUPpee5zidrmiRD-tTXPouSlU4RpScy5kNZY,87392
|
45
45
|
file_hub_client/utils/__init__.py,sha256=0WS1R9VEPEqIN6_ksHEbO6Eu0G1Ps6oNTuOtoDMdDMM,1832
|
46
46
|
file_hub_client/utils/converter.py,sha256=TX69Bqk-PwNdv2hYQ07_tW6HQnQycHcJkGeRnskeF3A,3734
|
47
47
|
file_hub_client/utils/download_helper.py,sha256=Mc8TQSWjHxIglJMkKlGy9r3LZe8e_Mwe6D3sfn6IOnY,13338
|
@@ -51,7 +51,7 @@ file_hub_client/utils/logging.py,sha256=IxcvWkA0G9s9BMiXIeFAdJX5G-Lc5-JFlS2yxOX1
|
|
51
51
|
file_hub_client/utils/retry.py,sha256=A2MBdJCEY-Ks0guq8dd5wXX22sD27N30Qy3nQIW1B_s,18019
|
52
52
|
file_hub_client/utils/smart_retry.py,sha256=RjBhyG6SNDfMXxNxKU_qayWDD6Ihp7ow6_BPjhgflM0,16465
|
53
53
|
file_hub_client/utils/upload_helper.py,sha256=gEtn9OXVJiGUpVev_fqrDnRQ6AFiiP9goLzFrVpqXmU,22569
|
54
|
-
tamar_file_hub_client-0.0.
|
55
|
-
tamar_file_hub_client-0.0.
|
56
|
-
tamar_file_hub_client-0.0.
|
57
|
-
tamar_file_hub_client-0.0.
|
54
|
+
tamar_file_hub_client-0.0.12.dist-info/METADATA,sha256=3rLc6RrrFYUHFj43A9FDcTEWj4Zm5pkHlgeq7ITa-zs,64874
|
55
|
+
tamar_file_hub_client-0.0.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
56
|
+
tamar_file_hub_client-0.0.12.dist-info/top_level.txt,sha256=9wcR7hyAJQdJg_kuH6WR3nmpJ8O-j8aJNK8f_kcFy6U,16
|
57
|
+
tamar_file_hub_client-0.0.12.dist-info/RECORD,,
|
File without changes
|
{tamar_file_hub_client-0.0.11.dist-info → tamar_file_hub_client-0.0.12.dist-info}/top_level.txt
RENAMED
File without changes
|