tosnativeclient 1.0.0__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.

@@ -0,0 +1,4 @@
1
+ from .tosnativeclient import TosClient, ListStream, ListObjectsResult, TosObject, TosError, TosException
2
+
3
+ __all__ = ['TosClient', 'ListStream', 'ListObjectsResult', 'TosObject', 'TosError',
4
+ 'TosException']
@@ -0,0 +1,91 @@
1
+ from typing import List
2
+
3
+ from typing import Optional
4
+
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
14
+
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
+
20
+ def list_objects(self, bucket: str, prefix: str = '', max_keys: int = 1000, delimiter: str = '') -> ListStream:
21
+ ...
22
+
23
+ def head_object(self, bucket: str, key: str) -> TosObject:
24
+ ...
25
+
26
+ def get_object(self, bucket: str, key: str, etag: str, size: int) -> ReadStream:
27
+ ...
28
+
29
+ def put_object(self, bucket: str, key: str, storage_class: str = '') -> WriteStream:
30
+ ...
31
+
32
+
33
+ class ListStream(object):
34
+ bucket: str
35
+ prefix: str
36
+ delimiter: str
37
+ max_keys: int
38
+
39
+ def __iter__(self) -> ListStream: ...
40
+
41
+ def __next__(self) -> ListObjectsResult: ...
42
+
43
+ def close(self) -> None: ...
44
+
45
+
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
+ class ReadStream(object):
59
+ bucket: str
60
+ key: str
61
+ size: int
62
+ etag: str
63
+
64
+ def read(self, offset: int, length: int) -> bytes:
65
+ ...
66
+
67
+ def close(self) -> None:
68
+ ...
69
+
70
+
71
+ class WriteStream(object):
72
+ bucket: str
73
+ key: str
74
+ storage_class: Optional[str]
75
+
76
+ def write(self, data: bytes) -> int:
77
+ ...
78
+
79
+ def close(self) -> None:
80
+ ...
81
+
82
+
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]
@@ -0,0 +1,10 @@
1
+ Metadata-Version: 2.4
2
+ Name: tosnativeclient
3
+ Version: 1.0.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Summary: python native client for tos
8
+ Author: xiangshijian
9
+ License: Apache-2.0
10
+ Requires-Python: >=3.8
@@ -0,0 +1,6 @@
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,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.8.7)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-macosx_11_0_arm64