File size: 413 Bytes
2abfccb
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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'])