一个简单可扩展的异步消息通知库
Project description
一个简单可扩展的异步消息通知库
安装
pip install use-notify
使用
from use_notify import useNotify, useNotifyChannel
# if you use usepy, also can use `usepy.plugin`
# from usepy.plugin import useNotify, useNotifyChannel
notify = useNotify()
notify.add(
# 添加多个通知渠道
useNotifyChannel.Bark({"token": "xxxxxx"}),
useNotifyChannel.Ding({
"token": "xxxxx",
"at_all": True
})
)
notify.publish(title="消息标题", content="消息正文")
支持的消息通知渠道列表
- Ding
- Bark
- Chanify
- Pushdeer
- Pushover
自己开发消息通知
from use_notify import useNotifyChannel
class Custom(useNotifyChannel.BaseChannel):
"""自定义消息通知"""
def send(self, *args, **kwargs):
...
async def send_async(self, *args, **kwargs):
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
use_notify-0.3.2.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file use_notify-0.3.2.tar.gz
.
File metadata
- Download URL: use_notify-0.3.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/6.2.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a5cc1af0f752e34ed5254e8a8b0950d66fa573f4785946d0bd5b20260c71c2e |
|
MD5 | a878fd34c46a433b33d28e5a79ef8efd |
|
BLAKE2b-256 | 48dabd0184ce6061c35dc5d414ebca7c42954a0319851b4125fa7ec416306bf8 |
File details
Details for the file use_notify-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: use_notify-0.3.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/6.2.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4656f5b398e7ef6ee593a33c5bf9fccee26727e4020a44bbe2133f4d80110e18 |
|
MD5 | 2196f72c114322b2743011a1fcf55b3a |
|
BLAKE2b-256 | 79fd3456918a7093b69627ee412196cebcf899bb714882d37653e26c2a59e96a |