摘要: import json python转为json:json.dumps(obj) json转为python:json.loads(obj) import json """ json python [] : json中的数组 列表 list {} : json中的对象 字典dict true True 阅读全文
posted @ 2020-04-18 23:49 mkay 阅读(1610) 评论(0) 推荐(0) 编辑
摘要: webservice接口:一个url下包含多个接口,返回数据为xml文档 安装模块 pip install suds-jurko from suds import client url = "https://xxxxxx" cli = client.Client(url=url) # 查看该webs 阅读全文
posted @ 2020-04-18 23:26 mkay 阅读(565) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8 import json key_list = [] def get_dict_allkeys(dict_a): """ 遍历嵌套字典,获取json返回结果的所有key值 :param dict_a: :return: key_list """ if isinstance 阅读全文
posted @ 2020-04-18 20:02 mkay 阅读(5256) 评论(0) 推荐(0) 编辑
摘要: 在代码上方加上:# coding:utf-8 阅读全文
posted @ 2020-04-18 19:00 mkay 阅读(4797) 评论(0) 推荐(2) 编辑