下载安装
pip install aliyun-python-sdk-core
代码示例
# -*- coding: utf8 -*-
from aliyunsdkcore.client import AcsClient
from aliyunsdkivpd.request.v20190625 import *
# 创建 AcsClient 实例
client = AcsClient("<your-access-key-id>", "<your-access-key-secret>", "<region>")
# 尺寸变换
request = ChangeImageSizeRequest()
request.set_Url("http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/IMG_20190515_202100.jpg")
request.set_Width(500)
request.set_Height(600)
response = client.do_action_with_exception(request)
print(response)