tamar-file-hub-client 0.0.11__tar.gz → 0.0.12__tar.gz

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.
Files changed (62) hide show
  1. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/PKG-INFO +1 -1
  2. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/taple/async_taple_service.py +14 -2
  3. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/taple/base_taple_service.py +13 -1
  4. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/taple/sync_taple_service.py +14 -2
  5. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/setup.py +1 -1
  6. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/tamar_file_hub_client.egg-info/PKG-INFO +1 -1
  7. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/MANIFEST.in +0 -0
  8. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/README.md +0 -0
  9. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/__init__.py +0 -0
  10. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/client.py +0 -0
  11. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/enums/__init__.py +0 -0
  12. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/enums/export_format.py +0 -0
  13. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/enums/role.py +0 -0
  14. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/enums/upload_mode.py +0 -0
  15. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/errors/__init__.py +0 -0
  16. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/errors/exceptions.py +0 -0
  17. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/py.typed +0 -0
  18. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/__init__.py +0 -0
  19. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/async_client.py +0 -0
  20. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/gen/__init__.py +0 -0
  21. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/gen/file_service_pb2.py +0 -0
  22. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/gen/file_service_pb2_grpc.py +0 -0
  23. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/gen/folder_service_pb2.py +0 -0
  24. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/gen/folder_service_pb2_grpc.py +0 -0
  25. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/gen/taple_service_pb2.py +0 -0
  26. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/gen/taple_service_pb2_grpc.py +0 -0
  27. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/interceptors.py +0 -0
  28. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/protos/file_service.proto +0 -0
  29. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/protos/folder_service.proto +0 -0
  30. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/protos/taple_service.proto +0 -0
  31. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/rpc/sync_client.py +0 -0
  32. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/schemas/__init__.py +0 -0
  33. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/schemas/context.py +0 -0
  34. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/schemas/file.py +0 -0
  35. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/schemas/folder.py +0 -0
  36. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/schemas/taple.py +0 -0
  37. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/__init__.py +0 -0
  38. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/file/__init__.py +0 -0
  39. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/file/async_blob_service.py +0 -0
  40. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/file/async_file_service.py +0 -0
  41. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/file/base_file_service.py +0 -0
  42. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/file/sync_blob_service.py +0 -0
  43. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/file/sync_file_service.py +0 -0
  44. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/folder/__init__.py +0 -0
  45. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/folder/async_folder_service.py +0 -0
  46. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/folder/sync_folder_service.py +0 -0
  47. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/taple/__init__.py +0 -0
  48. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/services/taple/idempotent_taple_mixin.py +0 -0
  49. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/__init__.py +0 -0
  50. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/converter.py +0 -0
  51. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/download_helper.py +0 -0
  52. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/file_utils.py +0 -0
  53. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/idempotency.py +0 -0
  54. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/logging.py +0 -0
  55. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/retry.py +0 -0
  56. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/smart_retry.py +0 -0
  57. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/file_hub_client/utils/upload_helper.py +0 -0
  58. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/setup.cfg +0 -0
  59. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/tamar_file_hub_client.egg-info/SOURCES.txt +0 -0
  60. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/tamar_file_hub_client.egg-info/dependency_links.txt +0 -0
  61. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/tamar_file_hub_client.egg-info/requires.txt +0 -0
  62. {tamar_file_hub_client-0.0.11 → tamar_file_hub_client-0.0.12}/tamar_file_hub_client.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tamar-file-hub-client
3
- Version: 0.0.11
3
+ Version: 0.0.12
4
4
  Summary: A Python SDK for gRPC-based file management system
5
5
  Home-page: https://github.com/Tamar-Edge-AI/file-hub-client
6
6
  Author: Oscar Ou
@@ -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
- from google.protobuf.struct_pb2 import ListValue
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
- visible_columns = MessageToDict(proto_view.visible_columns) if proto_view.HasField('visible_columns') else None
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
- visible_columns = MessageToDict(proto_view.visible_columns) if proto_view.HasField('visible_columns') else None
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
- from google.protobuf.struct_pb2 import ListValue
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
- visible_columns = MessageToDict(proto_view.visible_columns) if proto_view.HasField('visible_columns') else None
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,
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="tamar-file-hub-client",
5
- version="0.0.11",
5
+ version="0.0.12",
6
6
  description="A Python SDK for gRPC-based file management system",
7
7
  long_description=open("README.md", encoding="utf-8").read(),
8
8
  long_description_content_type="text/markdown",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tamar-file-hub-client
3
- Version: 0.0.11
3
+ Version: 0.0.12
4
4
  Summary: A Python SDK for gRPC-based file management system
5
5
  Home-page: https://github.com/Tamar-Edge-AI/file-hub-client
6
6
  Author: Oscar Ou