petrel-oss-python-sdk2 / tests /multipart_upload_test.py
Weiyun1025's picture
Upload folder using huggingface_hub
2abfccb verified
from petrel_client.client import Client
url = 's3://mybucket/100M'
client = Client()
content, get_info = client.get_with_info(
url, enable_stream=True, enable_etag=True)
print('etag', get_info['etag'])
put_result, put_info = client.put_with_info(
url + '.put', content, enable_md5=True, enable_etag=True)
print('put_result:', put_result)
print('md5:', put_info['md5'])
print('etag:', put_info['etag'])