tosnativeclient 1.0.0__cp313-cp313-macosx_11_0_arm64.whl → 1.0.2__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.

Potentially problematic release.


This version of tosnativeclient might be problematic. Click here for more details.

@@ -1,4 +1,25 @@
1
- from .tosnativeclient import TosClient, ListStream, ListObjectsResult, TosObject, TosError, TosException
1
+ from .tosnativeclient import TosClient, ListStream, ListObjectsResult, TosObject, ReadStream, WriteStream, TosError, \
2
+ TosException, TosRawClient, \
3
+ HeadObjectInput, HeadObjectOutput, GetObjectOutput, DeleteObjectInput, DeleteObjectOutput, GetObjectInput, \
4
+ PutObjectFromBufferInput, PutObjectFromFileInput, PutObjectOutput
2
5
 
3
- __all__ = ['TosClient', 'ListStream', 'ListObjectsResult', 'TosObject', 'TosError',
4
- 'TosException']
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
+ ]
@@ -1,8 +1,69 @@
1
- from typing import List
1
+ from typing import List, Dict
2
2
 
3
3
  from typing import Optional
4
4
 
5
5
 
6
+ class TosError(object):
7
+ message: str
8
+ status_code: Optional[int]
9
+ ec: str
10
+ request_id: str
11
+
12
+
13
+ class TosException(Exception):
14
+ args: List[TosError]
15
+
16
+
17
+ class TosObject(object):
18
+ bucket: str
19
+ key: str
20
+ size: int
21
+ etag: str
22
+
23
+
24
+ class ListObjectsResult(object):
25
+ contents: List[TosObject]
26
+ common_prefixes: List[str]
27
+
28
+
29
+ class ListStream(object):
30
+ bucket: str
31
+ prefix: str
32
+ delimiter: str
33
+ max_keys: int
34
+
35
+ def __iter__(self) -> ListStream: ...
36
+
37
+ def __next__(self) -> ListObjectsResult: ...
38
+
39
+ def close(self) -> None: ...
40
+
41
+
42
+ class ReadStream(object):
43
+ bucket: str
44
+ key: str
45
+ size: int
46
+ etag: str
47
+
48
+ def read(self, offset: int, length: int) -> bytes:
49
+ ...
50
+
51
+ def close(self) -> None:
52
+ ...
53
+
54
+
55
+ class WriteStream(object):
56
+ bucket: str
57
+ key: str
58
+ storage_class: Optional[str]
59
+
60
+ def write(self, data: bytes) -> int:
61
+ ...
62
+
63
+ def close(self) -> None:
64
+ ...
65
+
66
+
6
67
  class TosClient(object):
7
68
  region: str
8
69
  endpoint: str
@@ -26,66 +87,125 @@ class TosClient(object):
26
87
  def get_object(self, bucket: str, key: str, etag: str, size: int) -> ReadStream:
27
88
  ...
28
89
 
29
- def put_object(self, bucket: str, key: str, storage_class: str = '') -> WriteStream:
90
+ def put_object(self, bucket: str, key: str, storage_class: Optional[str] = '') -> WriteStream:
30
91
  ...
31
92
 
32
93
 
33
- class ListStream(object):
94
+ class HeadObjectInput(object):
34
95
  bucket: str
35
- prefix: str
36
- delimiter: str
37
- max_keys: int
38
-
39
- def __iter__(self) -> ListStream: ...
40
-
41
- def __next__(self) -> ListObjectsResult: ...
96
+ key: str
97
+ version_id: str
42
98
 
43
- def close(self) -> None: ...
99
+ def __init__(self, bucket: str, key: str, version_id: str = ''):
100
+ ...
44
101
 
45
102
 
46
- class ListObjectsResult(object):
47
- contents: List[TosObject]
48
- common_prefixes: List[str]
103
+ class HeadObjectOutput(object):
104
+ request_id: str
105
+ status_code: int
106
+ header: Dict[str, str]
107
+ content_length: int
108
+ etag: str
109
+ version_id: str
110
+ hash_crc64ecma: int
49
111
 
50
112
 
51
- class TosObject(object):
113
+ class DeleteObjectInput(object):
52
114
  bucket: str
53
115
  key: str
54
- size: int
55
- etag: str
116
+ version_id: str
117
+
118
+ def __init__(self, bucket: str, key: str, version_id: str = ''):
119
+ ...
56
120
 
57
121
 
58
- class ReadStream(object):
122
+ class DeleteObjectOutput(object):
123
+ request_id: str
124
+ status_code: int
125
+ header: Dict[str, str]
126
+ delete_marker: bool
127
+ version_id: str
128
+
129
+
130
+ class GetObjectInput(object):
59
131
  bucket: str
60
132
  key: str
61
- size: int
133
+ version_id: str
134
+ range: str
135
+
136
+ def __init__(self, bucket: str, key: str, version_id: str = '', range: str = ''):
137
+ ...
138
+
139
+
140
+ class GetObjectOutput(object):
141
+ request_id: str
142
+ status_code: int
143
+ header: Dict[str, str]
144
+ content_length: int
62
145
  etag: str
146
+ version_id: str
147
+ content_range: str
148
+ hash_crc64ecma: int
63
149
 
64
- def read(self, offset: int, length: int) -> bytes:
150
+ def read_all(self) -> bytes:
65
151
  ...
66
152
 
67
- def close(self) -> None:
153
+ def read(self) -> bytes:
68
154
  ...
69
155
 
70
156
 
71
- class WriteStream(object):
157
+ class PutObjectFromBufferInput(object):
72
158
  bucket: str
73
159
  key: str
74
- storage_class: Optional[str]
160
+ content: bytes
75
161
 
76
- def write(self, data: bytes) -> int:
162
+ def __init__(self, bucket: str, key: str, content: bytes):
77
163
  ...
78
164
 
79
- def close(self) -> None:
165
+
166
+ class PutObjectFromFileInput(object):
167
+ bucket: str
168
+ key: str
169
+ file_path: str
170
+
171
+ def __init__(self, bucket: str, key: str, file_path: str):
80
172
  ...
81
173
 
82
174
 
83
- class TosError(object):
84
- message: str
85
- status_code: Optional[int]
86
- ec: str
175
+ class PutObjectOutput(object):
87
176
  request_id: str
177
+ status_code: int
178
+ header: Dict[str, str]
179
+ etag: str
180
+ version_id: str
181
+ hash_crc64ecma: int
88
182
 
89
183
 
90
- class TosException(Exception):
91
- args: List[TosError]
184
+ class TosRawClient(object):
185
+ region: str
186
+ endpoint: str
187
+ ak: str
188
+ sk: str
189
+ connection_timeout: int
190
+ request_timeout: int
191
+ max_connections: int
192
+ max_retry_count: int
193
+
194
+ def __init__(self, region: str, endpoint: str, ak: str = '', sk: str = '', connection_timeout: int = 10000,
195
+ request_timeout: int = 120000, max_connections: int = 1024, max_retry_count: int = 3):
196
+ ...
197
+
198
+ def head_object(self, input: HeadObjectInput) -> HeadObjectOutput:
199
+ ...
200
+
201
+ def delete_object(self, input: DeleteObjectInput) -> DeleteObjectOutput:
202
+ ...
203
+
204
+ def get_object(self, input: GetObjectInput) -> GetObjectOutput:
205
+ ...
206
+
207
+ def put_object_from_buffer(self, input: PutObjectFromBufferInput) -> PutObjectOutput:
208
+ ...
209
+
210
+ def put_object_from_file(self, input: PutObjectFromFileInput) -> PutObjectOutput:
211
+ ...
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tosnativeclient
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Classifier: License :: OSI Approved :: Apache Software License
7
8
  Summary: python native client for tos
8
9
  Author: xiangshijian
9
10
  License: Apache-2.0
@@ -0,0 +1,6 @@
1
+ tosnativeclient-1.0.2.dist-info/METADATA,sha256=kxKXDUqD1di91wyOB9PGVgZ6Fqbmv1atCxw2XRXObxc,406
2
+ tosnativeclient-1.0.2.dist-info/WHEEL,sha256=YLLGMgiebwxzWB63F0KVTBu1H1ad3TdbsHYfFKfk6fc,104
3
+ tosnativeclient/__init__.py,sha256=HMlQnJ7kkLhK35BeX3i1ClGuKnd9TcUQ_jHCpR67kmc,748
4
+ tosnativeclient/tosnativeclient.cpython-313-darwin.so,sha256=V1-utFxaZA3ukonBruAkIKoJP3Q3azZYZs4RQgIh8Ec,8482672
5
+ tosnativeclient/tosnativeclient.pyi,sha256=p4quUdDXzVLDLlMInT2aYm4WrM3SeBJBq2GHz07k6g8,4410
6
+ tosnativeclient-1.0.2.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- tosnativeclient-1.0.0.dist-info/METADATA,sha256=dM-XZHvi4PmXyMLgWIXf7QfX_tJd7y-TwOugt-zEpxM,343
2
- tosnativeclient-1.0.0.dist-info/WHEEL,sha256=YLLGMgiebwxzWB63F0KVTBu1H1ad3TdbsHYfFKfk6fc,104
3
- tosnativeclient/__init__.py,sha256=l_NjXtwuBcfoPpOsu3demyI8BaT_F03ImpE6F3n65-U,217
4
- tosnativeclient/tosnativeclient.cpython-313-darwin.so,sha256=Lt02h7VPwZAwDvV1DRuXHGBTD1YvCDYaFxt02-Q5BCg,7963376
5
- tosnativeclient/tosnativeclient.pyi,sha256=AFU-tl7ZaDlf_DDEPEnSKKIHyQsqjY3yja5TShJpi3M,1877
6
- tosnativeclient-1.0.0.dist-info/RECORD,,