从 S3 下载文件:
import boto3
s3 = boto3.resource('s3')
s3.meta.client.download_file('bucket', 'origin_object_key', 'local_path')
往 S3 上传文件:
s3.meta.client.upload_file('local_path', 'bucket', 'origin_object_key')
python zip 解压
import zipfile
with zipfile.ZipFile(path_to_zip_file, 'r') as zip_ref:
zip_ref.extractall(directory_to_extract_to)
发表回复