Skip to main content

一个简单可扩展的异步消息通知库

Project description

一个简单可扩展的异步消息通知库

Package version Supported Python versions

安装

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="消息正文")

支持的消息通知渠道列表

  • Wechat
  • Ding
  • Bark
  • Email
  • 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


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.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

use_notify-0.3.3-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file use_notify-0.3.3.tar.gz.

File metadata

  • Download URL: use_notify-0.3.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.18 Linux/6.11.0-1015-azure

File hashes

Hashes for use_notify-0.3.3.tar.gz
Algorithm Hash digest
SHA256 88a936630ec948790ee7e2f6f217331282dccae0fec96c0948ac727a16a23980
MD5 0cdea38e79f025f9317450814d81f613
BLAKE2b-256 1c1cfd396aad3819602b72b7a2e62f03e2ba59e5ca9ee5d6f050b88588bbb459

See more details on using hashes here.

File details

Details for the file use_notify-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: use_notify-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.18 Linux/6.11.0-1015-azure

File hashes

Hashes for use_notify-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7eb9126ebd42703d1a7b2761da9905d4b6b4f5458d44de28d615fa79b7bb9232
MD5 828940e5a808eb43cf8c576ba1d50706
BLAKE2b-256 c2ebaa7d5125ba897ddfdb49b43952b37ebfc324c840a17f4fb133bc06e815ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page