galarm
一个消息发送合集,有以下模块
- EmailSender:邮件发送
- DingTalkSender:钉钉群聊机器人
EmailSender
有以下参数
- receiver:接收者(可以是列表)
- content_text:邮件内容
- content_html:邮件内容(html 形式)
- files:文件路径(可以是列表)
【示例】
sender = EmailSender(user='xxx', pwd='xxx')
sender.send(receiver='', content_text='这是一封测试邮件')
DingTalkSender
支持钉钉所有消息类型消息发送
了解链接:https://open.dingtalk.com/document/group/message-types-and-data-format#topic-2098229
【示例】
d = DingTalkSender(secret=DING_TALK_SECRET, access_token=DING_TALK_ACCESS_TOKEN)
d.send_text(content='测试消息', at_all=True)
d.send_text(content='测试消息', at_mobiles='xxx')
d.send_markdown(title='test', text='测试消息')
d.send_link(title='test', text='测试消息', message_url="https://www.baidu.com/")
d.send_feed_card(links=[
{
"title": "时代的火车向前开1",
"messageURL": "https://www.dingtalk.com/",
"picURL": "https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png"
},
{
"title": "时代的火车向前开2",
"messageURL": "https://www.dingtalk.com/",
"picURL": "https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png"
}
])
d.send_action_card_only(**{
"title": "乔布斯 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身",
"text": " \n\n #### 乔布斯 20 年前想打造的苹果咖啡厅 \n\n Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划",
"btn_orientation": 0,
"btns": [
{
"title": "内容不错",
"actionURL": "https://www.dingtalk.com/"
},
{
"title": "不感兴趣",
"actionURL": "https://www.dingtalk.com/"
}
]
})
Metadata
Release files for gsender 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gsender-0.0.3.tar.gz | 4.8 kB | Without provenance | Details for gsender-0.0.3.tar.gz |
Release files / gsender-0.0.3.tar.gz
| Download URL | gsender-0.0.3.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9248bf614b0c02165b11358fffc7b177d49a4d49989e460aea32f4f15b19be9a
|
|
BLAKE2b-256 checksum How to use checksums |
042243fe26d295c0f02b0943b9b3970e7c0b1f63f024a5fff3218e9fa1958f44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.2
|
Security for gsender 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.