
公共方法
石呆呆
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
公共方法收集3:requests请求
上传文件接口 def upload(self,method, url, data, filepath, headers): if 'http' not in url: # 链接里没有服务器就拼接一下 url = self.host + url body = { "method": method, "params": str(data), # {} 如果又传参,一定要转原创 2021-06-15 20:02:28 · 144 阅读 · 0 评论 -
公共方法收集2:读写文件
实现目的实现文件的读写代码1,使用openpyxl加载和编辑xlsx文件def load_excel(path): ''' 加载excel ''' open_excel = openpyxl.load_workbook(path) return open_exceldef excel_write_xlsx(row, cols, value, path): ''' 写入数据 ''' wb = load_excel(path)原创 2021-06-15 19:59:00 · 148 阅读 · 0 评论 -
公共方法收集1:json_compare
@[TOC]公共方法收集1:json_compare实现目的通过3个主要函数实现json数据格式的对比思维导图代码# 比较两个Josn Node的类型def compare_type(base, other): return type(base) is type(other)# 比较Json内容def compare_json(base, other): msg = "" result = True if not compare_type(base, o原创 2021-06-09 14:39:55 · 471 阅读 · 0 评论