Skip to main content

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

Project description

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

Package version Supported Python versions

安装

pip install usepy-plugin-notify

使用

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 usepy.plugin 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

usepy_plugin_notify-0.3.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

usepy_plugin_notify-0.3.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file usepy_plugin_notify-0.3.0.tar.gz.

File metadata

  • Download URL: usepy_plugin_notify-0.3.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.4 Darwin/21.4.0

File hashes

Hashes for usepy_plugin_notify-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b9bb0331ef96ef193daaef64b303a61b8abd1b2592f4cdd583c0ddbb9dd2dabf
MD5 badf95a46480612ac311ea02d87986ad
BLAKE2b-256 df4ca2e7a2d1ce7210a267972c03cc9e84cbf83e27fa75a848e9d1711dfbf936

See more details on using hashes here.

File details

Details for the file usepy_plugin_notify-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for usepy_plugin_notify-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e7c5dadf3d5858e7e1082c3290f7cead4337ab4616b63b961c0b586a6977381
MD5 71f5976e0fd579bf5bb0f371b62cf8bc
BLAKE2b-256 a621ab1e80bb9f19330cfc2a7d99743cf34486401352f54039ba997ae7b7d066

See more details on using hashes here.

Supported by

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