分类 python 中的文章

如何使用python获取Google MFA手机一次性验证码

编写生成 google mfa 验证的 python 脚本 需要使用的库是 onetimepass 网址: https://github.com/tadeck/onetimepass 安装命令: pip install onetimepass 安装好 onetimepass之后,编写生成mfa的python脚本 code.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import onetimepass as otp # type: ignore # 注意:如果你的电脑有多个python3版本,请在第1行选择合适的版本,同时确保 onetimepass 是安装在该解释器的环境下 # 否则可能会报……

阅读全文

python好用的命令行开发工具库

全自动的 CLI 工具库 Fire https://github.com/google/python-fire click https://click.palletsprojects.com/en/8.1.x/ typer https://typer.tiangolo.com/ poetry 一个 python 打包工具 https://python-poetry.org/……

阅读全文

使用 requirements.txt 管理你的python项目的依赖

前言 python 项目并没有类似于 java 的 maven 一样标准的库依赖管理工具。但是python开源届则普遍采用了一种约定使用 requirements.txt 保存项目依赖模块的做法。 而管理这个 requirements.txt 一般情况下,使用 pipreqs 这个工具。 安装命令如下: pip install pipreqs 生成项目的依赖 # ./ 指定要生成 requirements.txt 到哪个文件夹 # --encoding=utf8 指定要生成 requirements.txt 内容的编码格式 # --force 指定若 requirements.txt 存在时是否……

阅读全文