tosnativeclient 1.0.1__cp313-cp313-macosx_11_0_arm64.whl → 1.0.4__cp313-cp313-macosx_11_0_arm64.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.
@@ -1,21 +1,25 @@
1
- from .tosnativeclient import TosClient, ListStream, ListObjectsResult, TosObject, TosError, TosException, TosRawClient, \
1
+ from .tosnativeclient import TosClient, ListStream, ListObjectsResult, TosObject, ReadStream, WriteStream, TosError, \
2
+ TosException, TosRawClient, \
2
3
  HeadObjectInput, HeadObjectOutput, GetObjectOutput, DeleteObjectInput, DeleteObjectOutput, GetObjectInput, \
3
4
  PutObjectFromBufferInput, PutObjectFromFileInput, PutObjectOutput
4
5
 
5
- __all__ = ['TosClient',
6
- 'ListStream',
7
- 'ListObjectsResult',
8
- 'TosObject',
9
- 'TosError',
10
- 'TosException',
11
- 'TosRawClient',
12
- 'HeadObjectInput',
13
- 'HeadObjectOutput',
14
- 'DeleteObjectInput',
15
- 'DeleteObjectOutput',
16
- 'GetObjectInput',
17
- 'GetObjectOutput',
18
- 'PutObjectFromBufferInput',
19
- 'PutObjectFromFileInput',
20
- 'PutObjectOutput'
21
- ]
6
+ __all__ = [
7
+ 'TosError',
8
+ 'TosException',
9
+ 'TosClient',
10
+ 'ListStream',
11
+ 'ListObjectsResult',
12
+ 'TosObject',
13
+ 'ReadStream',
14
+ 'WriteStream',
15
+ 'TosRawClient',
16
+ 'HeadObjectInput',
17
+ 'HeadObjectOutput',
18
+ 'DeleteObjectInput',
19
+ 'DeleteObjectOutput',
20
+ 'GetObjectInput',
21
+ 'GetObjectOutput',
22
+ 'PutObjectFromBufferInput',
23
+ 'PutObjectFromFileInput',
24
+ 'PutObjectOutput'
25
+ ]
@@ -3,31 +3,27 @@ from typing import List, Dict
3
3
  from typing import Optional
4
4
 
5
5
 
6
- class TosClient(object):
7
- region: str
8
- endpoint: str
9
- ak: str
10
- sk: str
11
- part_size: int
12
- max_retry_count: int
13
- max_prefetch_tasks: int
6
+ class TosError(object):
7
+ message: str
8
+ status_code: Optional[int]
9
+ ec: str
10
+ request_id: str
14
11
 
15
- def __init__(self, region: str, endpoint: str, ak: str = '', sk: str = '', part_size: int = 8388608,
16
- max_retry_count: int = 3, max_prefetch_tasks: int = 3, directives: str = '', directory: str = '',
17
- file_name_prefix: str = '', shared_prefetch_tasks: int = 20):
18
- ...
19
12
 
20
- def list_objects(self, bucket: str, prefix: str = '', max_keys: int = 1000, delimiter: str = '') -> ListStream:
21
- ...
13
+ class TosException(Exception):
14
+ args: List[TosError]
22
15
 
23
- def head_object(self, bucket: str, key: str) -> TosObject:
24
- ...
25
16
 
26
- def get_object(self, bucket: str, key: str, etag: str, size: int) -> ReadStream:
27
- ...
17
+ class TosObject(object):
18
+ bucket: str
19
+ key: str
20
+ size: int
21
+ etag: str
28
22
 
29
- def put_object(self, bucket: str, key: str, storage_class: str = '') -> WriteStream:
30
- ...
23
+
24
+ class ListObjectsResult(object):
25
+ contents: List[TosObject]
26
+ common_prefixes: List[str]
31
27
 
32
28
 
33
29
  class ListStream(object):
@@ -43,25 +39,13 @@ class ListStream(object):
43
39
  def close(self) -> None: ...
44
40
 
45
41
 
46
- class ListObjectsResult(object):
47
- contents: List[TosObject]
48
- common_prefixes: List[str]
49
-
50
-
51
- class TosObject(object):
52
- bucket: str
53
- key: str
54
- size: int
55
- etag: str
56
-
57
-
58
42
  class ReadStream(object):
59
43
  bucket: str
60
44
  key: str
61
45
  size: int
62
46
  etag: str
63
47
 
64
- def read(self, offset: int, length: int) -> bytes:
48
+ def read(self, offset: int, length: int) -> Optional[bytes]:
65
49
  ...
66
50
 
67
51
  def close(self) -> None:
@@ -80,44 +64,34 @@ class WriteStream(object):
80
64
  ...
81
65
 
82
66
 
83
- class TosError(object):
84
- message: str
85
- status_code: Optional[int]
86
- ec: str
87
- request_id: str
88
-
89
-
90
- class TosException(Exception):
91
- args: List[TosError]
92
-
93
-
94
- class TosRawClient(object):
67
+ class TosClient(object):
95
68
  region: str
96
69
  endpoint: str
97
70
  ak: str
98
71
  sk: str
99
- connection_timeout: int
100
- request_timeout: int
101
- max_connections: int
72
+ part_size: int
102
73
  max_retry_count: int
74
+ max_prefetch_tasks: int
75
+ directives: str
76
+ directory: str
77
+ file_name_prefix: str
78
+ shared_prefetch_tasks: int
103
79
 
104
- def __init__(self, region: str, endpoint: str, ak: str = '', sk: str = '', connection_timeout: int = 10000,
105
- request_timeout: int = 120000, max_connections: int = 1024, max_retry_count: int = 3):
106
- ...
107
-
108
- def head_object(self, input: HeadObjectInput) -> HeadObjectOutput:
80
+ def __init__(self, region: str, endpoint: str, ak: str = '', sk: str = '', part_size: int = 8388608,
81
+ max_retry_count: int = 3, max_prefetch_tasks: int = 3, directives: str = '', directory: str = '',
82
+ file_name_prefix: str = '', shared_prefetch_tasks: int = 20):
109
83
  ...
110
84
 
111
- def delete_object(self, input: DeleteObjectInput) -> DeleteObjectOutput:
85
+ def list_objects(self, bucket: str, prefix: str = '', max_keys: int = 1000, delimiter: str = '') -> ListStream:
112
86
  ...
113
87
 
114
- def get_object(self, input: GetObjectInput) -> GetObjectOutput:
88
+ def head_object(self, bucket: str, key: str) -> TosObject:
115
89
  ...
116
90
 
117
- def put_object_from_buffer(self, input: PutObjectFromBufferInput) -> PutObjectOutput:
91
+ def get_object(self, bucket: str, key: str, etag: str, size: int) -> ReadStream:
118
92
  ...
119
93
 
120
- def put_object_from_file(self, input: PutObjectFromFileInput) -> PutObjectOutput:
94
+ def put_object(self, bucket: str, key: str, storage_class: Optional[str] = '') -> WriteStream:
121
95
  ...
122
96
 
123
97
 
@@ -177,10 +151,10 @@ class GetObjectOutput(object):
177
151
  content_range: str
178
152
  hash_crc64ecma: int
179
153
 
180
- def read_all(self) -> bytes:
154
+ def read_all(self) -> Optional[bytes]:
181
155
  ...
182
156
 
183
- def read(self) -> bytes:
157
+ def read(self) -> Optional[bytes]:
184
158
  ...
185
159
 
186
160
 
@@ -209,3 +183,33 @@ class PutObjectOutput(object):
209
183
  etag: str
210
184
  version_id: str
211
185
  hash_crc64ecma: int
186
+
187
+
188
+ class TosRawClient(object):
189
+ region: str
190
+ endpoint: str
191
+ ak: str
192
+ sk: str
193
+ connection_timeout: int
194
+ request_timeout: int
195
+ max_connections: int
196
+ max_retry_count: int
197
+
198
+ def __init__(self, region: str, endpoint: str, ak: str = '', sk: str = '', connection_timeout: int = 10000,
199
+ request_timeout: int = 120000, max_connections: int = 1024, max_retry_count: int = 3):
200
+ ...
201
+
202
+ def head_object(self, input: HeadObjectInput) -> HeadObjectOutput:
203
+ ...
204
+
205
+ def delete_object(self, input: DeleteObjectInput) -> DeleteObjectOutput:
206
+ ...
207
+
208
+ def get_object(self, input: GetObjectInput) -> GetObjectOutput:
209
+ ...
210
+
211
+ def put_object_from_buffer(self, input: PutObjectFromBufferInput) -> PutObjectOutput:
212
+ ...
213
+
214
+ def put_object_from_file(self, input: PutObjectFromFileInput) -> PutObjectOutput:
215
+ ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tosnativeclient
3
- Version: 1.0.1
3
+ Version: 1.0.4
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -0,0 +1,6 @@
1
+ tosnativeclient-1.0.4.dist-info/METADATA,sha256=ZWaXIKtQak0QejtyjsBwtbwvwDcNA65jpJPzmZVrgCc,406
2
+ tosnativeclient-1.0.4.dist-info/WHEEL,sha256=YLLGMgiebwxzWB63F0KVTBu1H1ad3TdbsHYfFKfk6fc,104
3
+ tosnativeclient/__init__.py,sha256=HMlQnJ7kkLhK35BeX3i1ClGuKnd9TcUQ_jHCpR67kmc,748
4
+ tosnativeclient/tosnativeclient.cpython-313-darwin.so,sha256=GI_sPR79TDQaBKKvgmj6scjVF3Xps5_nI3yHxWDRyeU,8510304
5
+ tosnativeclient/tosnativeclient.pyi,sha256=lvcdCvTo5OLMObCSQlPOy01OF4-muVDtSwOwoSUvMTo,4536
6
+ tosnativeclient-1.0.4.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- tosnativeclient-1.0.1.dist-info/METADATA,sha256=KsO8QsFcbFlueW53M9b-HrymX01loNn0yyw3lzSsT2I,406
2
- tosnativeclient-1.0.1.dist-info/WHEEL,sha256=YLLGMgiebwxzWB63F0KVTBu1H1ad3TdbsHYfFKfk6fc,104
3
- tosnativeclient/__init__.py,sha256=9dB3mo0DeiM7DqlttQLM_CAz5biGjSLGV_pyF8Br9cE,791
4
- tosnativeclient/tosnativeclient.cpython-313-darwin.so,sha256=UeEfgakJLEF5g9iy5TFSUN2BlOvNMfHiKKnaT6xzXrU,8462368
5
- tosnativeclient/tosnativeclient.pyi,sha256=2Gw9isUPYyIxGQ4wP6fK2_tYRyszI2k7BInPVCeFoMU,4400
6
- tosnativeclient-1.0.1.dist-info/RECORD,,