PYSunday 其它API
还有其它好用的api在这里展示
sunday.core.cmdexec.cmdexec
(cmd, timeout=10, **kwargs)执行系统命令, 返回: code, stdout, stderr, 当code不为0则为报错
sunday.core.getConfig.getConfig
(name, file='config.ini', default={})返回能获取全局配置文件值的函数
sunday.core.globalvar.getvar
(name)返回全局变量值
sunday.core.globalvar.setvar
(name, value)设置全局变量值
sunday.utils.md5.getMd5
(value)sunday.utils.tools.parseJsonp
(text, defvalue={})sunday.utils.tools.currentTimestamp
()sunday.core.common.exit
(str='')退出程序
sunday.core.common.clear
()清理屏幕
sunday.core.common.pascal_to_snake
(camel_case)驼峰转蛇形
sunday.core.common.snake_to_pascal
(snake_case)蛇形转驼峰
sunday.core.common.parseJson
(jsonPath, defaultValue={}, keywords=[], logger=None)传入json文件,返回解析后的数据
sunday.core.getEnv.getEnv
(key)返回env中对应key的值
sunday.utils.image.grenImagePng
(*args, **kwargs)sunday.utils.image.grenImageJpeg
(*args, **kwargs)sunday.utils.image.grenImageJpg
(*args, **kwargs)sunday.utils.image.grenImageGif
(*args, **kwargs)