tamar-file-hub-client 0.0.9__py3-none-any.whl → 0.0.11__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/rpc/gen/file_service_pb2.py +28 -28
- file_hub_client/rpc/gen/taple_service_pb2.py +174 -174
- file_hub_client/rpc/protos/file_service.proto +1 -0
- file_hub_client/rpc/protos/taple_service.proto +4 -4
- file_hub_client/schemas/taple.py +412 -412
- file_hub_client/services/file/async_blob_service.py +3 -1
- file_hub_client/services/file/sync_blob_service.py +3 -1
- file_hub_client/services/taple/async_taple_service.py +2285 -2291
- file_hub_client/services/taple/base_taple_service.py +367 -352
- file_hub_client/services/taple/sync_taple_service.py +11 -17
- {tamar_file_hub_client-0.0.9.dist-info → tamar_file_hub_client-0.0.11.dist-info}/METADATA +1 -1
- {tamar_file_hub_client-0.0.9.dist-info → tamar_file_hub_client-0.0.11.dist-info}/RECORD +14 -14
- {tamar_file_hub_client-0.0.9.dist-info → tamar_file_hub_client-0.0.11.dist-info}/WHEEL +0 -0
- {tamar_file_hub_client-0.0.9.dist-info → tamar_file_hub_client-0.0.11.dist-info}/top_level.txt +0 -0
@@ -504,6 +504,7 @@ class AsyncBlobService(BaseFileService):
|
|
504
504
|
self,
|
505
505
|
file_id: str,
|
506
506
|
*,
|
507
|
+
is_cdn: Optional[bool] = True,
|
507
508
|
expire_seconds: Optional[int] = None,
|
508
509
|
request_id: Optional[str] = None,
|
509
510
|
**metadata
|
@@ -513,6 +514,7 @@ class AsyncBlobService(BaseFileService):
|
|
513
514
|
|
514
515
|
Args:
|
515
516
|
file_id: 文件ID
|
517
|
+
is_cdn: 是否返回CDN的URL
|
516
518
|
expire_seconds: 过期时间(秒)
|
517
519
|
request_id: 请求ID(可选,如果不提供则自动生成)
|
518
520
|
**metadata: 额外的元数据(如 x-org-id, x-user-id 等)
|
@@ -524,7 +526,7 @@ class AsyncBlobService(BaseFileService):
|
|
524
526
|
|
525
527
|
stub = await self.client.get_stub(file_service_pb2_grpc.FileServiceStub)
|
526
528
|
|
527
|
-
request = file_service_pb2.DownloadUrlRequest(file_id=file_id,
|
529
|
+
request = file_service_pb2.DownloadUrlRequest(file_id=file_id, is_cdn=is_cdn,
|
528
530
|
expire_seconds=expire_seconds if expire_seconds else None)
|
529
531
|
|
530
532
|
# 构建元数据
|
@@ -502,6 +502,7 @@ class SyncBlobService(BaseFileService):
|
|
502
502
|
self,
|
503
503
|
file_id: str,
|
504
504
|
*,
|
505
|
+
is_cdn: Optional[bool] = True,
|
505
506
|
expire_seconds: Optional[int] = None,
|
506
507
|
request_id: Optional[str] = None,
|
507
508
|
**metadata
|
@@ -511,6 +512,7 @@ class SyncBlobService(BaseFileService):
|
|
511
512
|
|
512
513
|
Args:
|
513
514
|
file_id: 文件ID
|
515
|
+
is_cdn: 是否返回CDN的URL
|
514
516
|
expire_seconds: 过期时间(秒)
|
515
517
|
request_id: 请求ID(可选,如果不提供则自动生成)
|
516
518
|
**metadata: 额外的元数据(如 x-org-id, x-user-id 等)
|
@@ -522,7 +524,7 @@ class SyncBlobService(BaseFileService):
|
|
522
524
|
|
523
525
|
stub = self.client.get_stub(file_service_pb2_grpc.FileServiceStub)
|
524
526
|
|
525
|
-
request = file_service_pb2.DownloadUrlRequest(file_id=file_id,
|
527
|
+
request = file_service_pb2.DownloadUrlRequest(file_id=file_id, is_cdn=is_cdn,
|
526
528
|
expire_seconds=expire_seconds if expire_seconds else None)
|
527
529
|
|
528
530
|
# 构建元数据
|