mail.tm 的 python web api 包装器和命令行客户端。
项目描述
这是mail.tm的命令行界面和 python web-api 包装器。
api 记录在这里。
依赖项
xclip或xsel用于剪贴板复制。
用于打开传入 html 电子邮件的浏览器。
安装
带点
pip install pymailtm
在虚拟环境中
python -m venv .venv
源.venv/bin/activate
pip install pymailtm
用法
该实用程序可以通过以下方式调用:
pymailtm
请记住,如果您在虚拟环境中,则需要先激活它。
默认情况下,该命令恢复上次使用的帐户,将其复制到剪贴板并等待新消息到达:当它到达时,它会在浏览器中以快速&脏的 html 视图打开。
按 退出等待循环Ctrl+c。
使用标志调用实用程序-l将打印帐户凭据,在浏览器中打开mail.tm客户端并退出。
该标志-n可用于强制创建新帐户。
安全警告
这被认为是一个不安全的、快速的一次性临时邮件帐户生成器。
不要将它与敏感数据一起使用。
实用程序运行时到达的邮件将保存在
系统临时文件夹(可能)中的纯文本/tmp/文件中,以便浏览器可以打开它们。
最后使用的帐户的数据和凭据将以
纯文本格式保存在~/.pymailtm.
发展
pip install invoke poetry
现在克隆 git repo:
git clone git@github.com:CarloDePieri/pymailtm.git
cd pymailtm
inv install
这将尝试基于python3.7并安装所有项目的依赖项创建一个 virtualenv。如果首选不同的 python 版本,可以通过指定--python( -p) 标志来选择它,如下所示:
inv install -p python3.8
现在可以通过启动直接运行该脚本inv run。它还接受标志,例如:
inv run -n
可以使用以下命令运行测试套件:
inv test # run the test suite
inv test --full # run even tests that requires a graphical environment
inv test-spec # run the tests while showing the output as a spec document
inv test-cov # run the tests suite and produce a coverage report
测试利用vcrpy来缓存网络请求和响应。如果您需要清除此缓存运行:
inv clear-cassettes
使用act测试 github 工作流程:
inv act-dev # test the dev workflow
inv act-dev -c shell # open a shell in the act container (the above must fail first!)
inv act-dev -c clean # stop and delete a failed act container
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
pymailtm-1.1.1.tar.gz
(18.8 kB
查看哈希)
内置分布
pymailtm-1.1.1-py3-none-any.whl
(19.1 kB
查看哈希)