Python SDK 可通过 Access Key 初始化。您可以根据需求选择设置 AK/SK 的方法。本文为您介绍初始化的操作步骤。
智能处理服务支持的区域:华北 cn-north-1。
支持 3 种 AK/SK 的设置方法。
imp_service.set_ak('ak') imp_service.set_sk('sk')
VOLC_ACCESSKEY="ak" VOLC_SECRETKEY="sk"
在本地的 ~/.volc/config 中添加如下内容:
{ "ak":"Your-AK", "sk":"Your-SK" }
# coding:utf-8 from volcengine.imp.ImpService import ImpService if __name__ == '__main__': imp_service = ImpService(region='cn-north-1') # call below method if you dont set ak and sk in $HOME/.vcloud/config imp_service.set_ak('your ak') imp_service.set_sk('your sk') # then call specific action