Skip to main content

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

Project description

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

Package version Supported Python versions

安装

pip install usepy-plugin-notify

使用

from src.notify import useNotify, channels

notify = useNotify()
notify.add(
    # 添加多个通知渠道
    channels.Bark({"token": "xxxxxx"}),
    channels.Ding({
        "token": "xxxxx",
        "at_all": True
    })
)

notify.publish(title="消息标题", content="消息正文")

支持的消息通知渠道列表

  • Wechat
  • Ding
  • Bark
  • Email
  • Chanify
  • Pushdeer
  • Pushover

自己开发消息通知

from src.notify.channels import BaseChannel


class Custom(BaseChannel):
    """自定义消息通知"""

    def send(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.2.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

usepy_plugin_notify-0.2.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: usepy_plugin_notify-0.2.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.10 Darwin/22.2.0

File hashes

Hashes for usepy_plugin_notify-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0c28797597662febcaa3f685855e89d325b9d470af3637b16c2498c4eccebc6e
MD5 a665a6a5140cfabd7f42b2b327167259
BLAKE2b-256 63330417d3c12b8d4f3eb29d17531617f6eb71d33ffba049cfebfee6c8f78a97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for usepy_plugin_notify-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 320e985586a2c603cf4de776651c315bf012cd4a30e0ef3c10d68a90dfe238e0
MD5 1eaebd20f38d32e87c20b69f073b258a
BLAKE2b-256 4b0f6f7c5cdf9517fc512d2292faf46795c92f88ebfd625c8ed86957dd5d4377

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