1 Star 0 Fork 0

茗趣yhj / 阿里云_api网关sdk_python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

1、本示例的 Python 版本为2.7

2、本demo主要是为了提供签名方法,调用示例可以参考 ClientDemo.py 文件

3、使用注意事项:

  • 含有中文和空格的query, body在请求时需要对值进行urlencode处理,编码为utf-8.
  • 参数参与签名时,必须使用原文签名,不能用urlencode后字符串的进行签名.所以请在签名之后再对query、body的值做urlencode.
  • 签名文档

以上为阿里官方自带

在使用过程中发现,get请求 query 参数含有中文时会出现签名失败的原因,排查发现上述提供的签名是使用原文签名了,但后续并为对 URL 进行 urlencode,因此在com/aliyun/api/gateway/sdk/client.py中的 execute() 方法中签名之后做修改。

  • 在含中文参数的get 请求下 需设置 set_query_str() 且参数格式为字典格式
  • ClientDemo.py 同级目录下新建 config.yaml 文件 里面配置信息
APP_KEY: "your app_key"
APP_SECRET: "your app_secret"
Copyright 1999-2015 Alibaba Group Holding Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

修改阿里云api网关python版本 展开 收起
Python
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/yhjkcjm/alicloud-api-gateway-sdk-python.git
git@gitee.com:yhjkcjm/alicloud-api-gateway-sdk-python.git
yhjkcjm
alicloud-api-gateway-sdk-python
阿里云_api网关sdk_python
master

搜索帮助