欢迎来到李先生的博客

深山的鹿,不知归处;万般皆苦,只可自渡。
扩大
缩小

2021年5月26日

Python的序列化与反序列化

摘要: 一、什么是序列化和反序列化 The process of converting a structured object into a sequence of bytes which can be stored in a file system or database or sent through 阅读全文

posted @ 2021-05-26 11:22 Captain_Li 阅读(1062) 评论(0) 推荐(0) 编辑

Python中json.load()和json.loads()的区别

摘要: 一、图解 json.loads():解析一个有效的JSON字符串并将其转换为Python字典 json.load():从一个文件读取JSON类型的数据,然后转转换成Python字典 二、json.loads()用法 1、例子 import json data = { "name": "Satyam 阅读全文

posted @ 2021-05-26 11:14 Captain_Li 阅读(564) 评论(0) 推荐(0) 编辑

Python中json.dump()和json.dumps()的区别

摘要: 一、图解 json.dumps(dict, indent):将Python对象转换成json字符串 json.dump(dict, file_pointer):将Python对象写入json文件 二、json.dumps()用法 1、用法 json.dumps(dict, indent):将Pyth 阅读全文

posted @ 2021-05-26 11:01 Captain_Li 阅读(1004) 评论(0) 推荐(0) 编辑

Python调用Jenkins API的正确使用姿势

摘要: 当需要批量获取Jenkins上Job的信息时,可以通过Python调用API的方式获取信息,然后再对返回的结果进行分析转化,得到自己想要的结果。 1、Python模块包 pip3 install python-jenkins 2、登陆方式 1)明文 server = jenkins.Jenkins( 阅读全文

posted @ 2021-05-26 10:54 Captain_Li 阅读(1109) 评论(0) 推荐(0) 编辑

导航