Providers#

ServerChan3#

接入各大手机厂商推送,推荐使用

pydantic model pushx.providers.serverchan3.NotifierParams[源代码]#

基类:BaseProviderParams

Notifier 所需参数

Show JSON schema
{
   "title": "NotifierParams",
   "description": "Notifier \u6240\u9700\u53c2\u6570",
   "type": "object",
   "properties": {
      "sendkey": {
         "title": "Sendkey",
         "type": "string"
      },
      "uid": {
         "title": "Uid",
         "type": "integer"
      }
   },
   "required": [
      "sendkey",
      "uid"
   ]
}

Fields:
field sendkey: str [Required]#

ServerChan3 的 SendKey

field uid: int [Required]#

ServerChan3 的 UID

pydantic model pushx.providers.serverchan3.NotifyParams[源代码]#

基类:BaseProviderParams

Notify 所需参数

Show JSON schema
{
   "title": "NotifyParams",
   "description": "Notify \u6240\u9700\u53c2\u6570",
   "type": "object",
   "properties": {
      "title": {
         "title": "Title",
         "type": "string"
      },
      "desp": {
         "default": null,
         "title": "Desp",
         "type": "string"
      },
      "tags": {
         "default": null,
         "title": "Tags",
         "type": "string"
      },
      "short": {
         "default": null,
         "title": "Short",
         "type": "string"
      }
   },
   "required": [
      "title"
   ]
}

Fields:
field desp: str = None#

通知的内容,支持 Markdown

field short: str = None#

通知的略缩

field tags: str = None#

通知的 tags

field title: str [Required]#

通知的标题

class pushx.providers.serverchan3.ServerChan3[源代码]#

基类:BasePushProvider

Ntfy#

接入 FCM,开源,自定义程度高

pydantic model pushx.providers.ntfy.NotifierParams[源代码]#

基类:BaseProviderParams

Notifier 所需参数

Show JSON schema
{
   "title": "NotifierParams",
   "description": "Notifier \u6240\u9700\u53c2\u6570",
   "type": "object",
   "properties": {
      "topic": {
         "title": "Topic",
         "type": "string"
      },
      "base_url": {
         "default": "https://ntfy.sh",
         "title": "Base Url",
         "type": "string"
      }
   },
   "required": [
      "topic"
   ]
}

Fields:
field base_url: str = 'https://ntfy.sh'#

Ntfy 服务器 URL

field topic: str [Required]#

Ntfy 的 topic

pydantic model pushx.providers.ntfy.NotifyParams[源代码]#

基类:BaseProviderParams

Notify 所需参数

Show JSON schema
{
   "title": "NotifyParams",
   "description": "Notify \u6240\u9700\u53c2\u6570",
   "type": "object",
   "properties": {
      "topic": {
         "default": null,
         "title": "Topic",
         "type": "string"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "message": {
         "default": null,
         "title": "Message",
         "type": "string"
      },
      "tags": {
         "default": null,
         "items": {
            "type": "string"
         },
         "title": "Tags",
         "type": "array"
      },
      "priority": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "$ref": "#/$defs/Priority"
            }
         ],
         "default": null,
         "title": "Priority"
      },
      "actions": {
         "default": null,
         "items": {
            "type": "object"
         },
         "title": "Actions",
         "type": "array"
      },
      "click": {
         "default": null,
         "title": "Click",
         "type": "string"
      },
      "markdown": {
         "default": null,
         "title": "Markdown",
         "type": "boolean"
      },
      "icon": {
         "default": null,
         "title": "Icon",
         "type": "string"
      },
      "attach": {
         "default": null,
         "title": "Attach",
         "type": "string"
      },
      "filename": {
         "default": null,
         "title": "Filename",
         "type": "string"
      },
      "delay": {
         "default": null,
         "title": "Delay",
         "type": "integer"
      }
   },
   "$defs": {
      "Priority": {
         "description": "priority \u7684\u679a\u4e3e\u7c7b",
         "enum": [
            5,
            4,
            3,
            2,
            1
         ],
         "title": "Priority",
         "type": "integer"
      }
   },
   "required": [
      "title"
   ]
}

Config:
  • use_enum_values: bool = True

Fields:
field actions: List[Dict] = None#

通知的 Actions

field attach: str = None#

附件的 URL

field click: str = None#

点击通知时打开的 URL

field delay: int = None#

延迟交付的时间戳或持续时间

field filename: str = None#

附件的文件名

field icon: str = None#

通知图标的 URL

field markdown: bool = None#

message 是否为 Markdown 格式

field message: str = None#

通知的内容,支持 Markdown

field priority: int | Priority = None#

通知的优先级

field tags: List[str] = None#

通知的 tags

field title: str [Required]#

通知的标题

field topic: str = None#

无实际作用,会被覆盖

class pushx.providers.ntfy.Ntfy[源代码]#

基类:BasePushProvider

class pushx.providers.ntfy.Priority(*values)[源代码]#

基类:Enum

priority 的枚举类

default = 3#
high = 4#
low = 2#
max = 5#
min = 1#

ServerChanTurbo#

暂时不支持端到端加密

pydantic model pushx.providers.serverchanturbo.NotifierParams[源代码]#

基类:BaseProviderParams

Notifier 所需参数

Show JSON schema
{
   "title": "NotifierParams",
   "description": "Notifier \u6240\u9700\u53c2\u6570",
   "type": "object",
   "properties": {
      "sendkey": {
         "title": "Sendkey",
         "type": "string"
      }
   },
   "required": [
      "sendkey"
   ]
}

Fields:
field sendkey: str [Required]#

ServerChanTurbo 的 SendKey

pydantic model pushx.providers.serverchanturbo.NotifyParams[源代码]#

基类:BaseProviderParams

Notify 所需参数

Show JSON schema
{
   "title": "NotifyParams",
   "description": "Notify \u6240\u9700\u53c2\u6570",
   "type": "object",
   "properties": {
      "title": {
         "title": "Title",
         "type": "string"
      },
      "desp": {
         "default": null,
         "title": "Desp",
         "type": "string"
      },
      "tags": {
         "default": null,
         "title": "Tags",
         "type": "string"
      },
      "short": {
         "default": null,
         "title": "Short",
         "type": "string"
      },
      "noip": {
         "default": null,
         "title": "Noip",
         "type": "boolean"
      },
      "channel": {
         "default": null,
         "title": "Channel",
         "type": "string"
      },
      "openid": {
         "default": null,
         "title": "Openid",
         "type": "string"
      }
   },
   "required": [
      "title"
   ]
}

Fields:
field channel: str = None#

使用的消息通道

field desp: str = None#

通知的内容,支持 Markdown

field noip: bool = None#

是否隐藏调用 IP

field openid: str = None#

消息抄送的 OPENID

field short: str = None#

通知的略缩

field tags: str = None#

通知的 tags

field title: str [Required]#

通知的标题

serialize_noip(value: bool) int[源代码]#
class pushx.providers.serverchanturbo.ServerChanTurbo[源代码]#

基类:BasePushProvider