Weiyun1025's picture
Upload folder using huggingface_hub
2abfccb verified
raw
history blame
No virus
1.5 kB
from libcpp.string cimport string
from libcpp.list cimport list
from libcpp.pair cimport pair
from libcpp.vector cimport vector
cdef extern from "s3client.h":
cdef cppclass S3Client:
S3Client(
const string &ak,
const string &sk,
const string &endpoint,
bint verify_ssl,
bint enable_https,
bint use_dual_stack,
int threads_num,
) except +
int get_object(const string &bucket, const string &key, int &error_type, string &error_message, string &result, string &range) nogil
int multipart_download_concurrency(const string &bucket, const string &key, const string &filename, int &error_type, string &error_message) nogil
int put_object(const string &bucket, const string &key, const string &data, int &error_type, string &error_message) nogil
int multipart_upload_concurrency(const string &bucket, const string &key, const string &filename, int &error_type, string &error_message) nogil
int delete_obj(const string &bucket, const string &key, int error_type, const string &error_message) nogil
int contains(const string &bucket, const string &key, int error_type, const string &error_message) nogil
vector[string] list(const string &bucket, const string &key, int error_type, const string &error_message) nogil
cdef void init_api(const string &bucket)
cdef void shutdown_api()
cdef list[pair[int, string]] get_error_list()