随笔分类 - Python
摘要:构造一个简单的CLI程序 typer 这个从去年就被各种营销号吹成Web框架的 第三方库, 与 FastAPI 同出一人之手,它不是Web框架,它是一个用来构建CLI程序的库,我们就简单搞个例子 # 更多用法,看文档 import typer # 实例一下 app = typer.Typer() #
阅读全文
摘要:mitmproxy mitmproxy is a set of tools that provide an interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets. 安装 pip insta
阅读全文
摘要:参考资料 https://www.liujiangblog.com/blog/15/ https://blog.csdn.net/leorx01/article/details/71141643 http://docs.paramiko.org/en/stable/api/client.html h
阅读全文
摘要:原始版本 简书:https://www.jianshu.com/p/6bfaca87a93b 博客园:https://www.cnblogs.com/zy7y/p/13426816.html testerhome:https://testerhome.com/topics/25003 最新用例截图以
阅读全文
摘要:0. 学习资料 https://www.imooc.com/video/16361 1. collections 拥有的数据结构: __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString
阅读全文
摘要:资料 https://pymysql.readthedocs.io/en/latest/index.html 安装 pip install pymysql ⚠️:MySQL Server – one of the following: MySQL >= 5.5 MariaDB >= 5.5 #!/u
阅读全文
摘要:废话 和几个朋友聊天然后出来的产物希望能帮到大家学习接口自动化测试,欢迎大家交流指出不合适的地方,源码在文末 功能 实现:get/post请求(上传文件)::理论上其他delete/put等请求也实现了,支持restful接口规范 发送邮件 生成allure测试报告 压缩测试报告文件 数据依赖 运行
阅读全文
摘要:参考:https://www.liaoxuefeng.com/wiki/1016959663602400/1017630786314240#0 ####ThreadLocal ThreadLocal变量虽然是全局变量,但每个线程都只能读写自己线程的独立副本,互不干扰。ThreadLocal解决了参数
阅读全文
摘要:参考:https://www.liaoxuefeng.com/wiki/1016959663602400/1017629247922688 多任务可以由多进程完成,也可以由一个进程内的多线程完成。 进程是由若干线程组成的,一个进程至少有一个线程。 threading import time impo
阅读全文
摘要:参考:https://www.liaoxuefeng.com/wiki/1016959663602400/1017627212385376 进程 在操作系统中一个任务对应一个进程,如打开了word就启动了一个word进程 线程 一个进程下可以有多个线程但至少一个线程, Word,它可以同时进行打字、
阅读全文
摘要:摘自官网:https://docs.python.org/zh-cn/3.7/tutorial/errors.html # 处理异常 try...expect...else(可选) while True: try: user_input = int(input('请输入一个数字按下回车:')) br
阅读全文
摘要:# 格式化字符串: 在字符串前加上 f 或者 F 使用 {变量名} 的形式来使用变量名的值 year = 2020 event = 'Referendum' value = f'Results of the {year} {event}' print(f'Results of the {year}
阅读全文