该部分标识了该库支持的所有服务。请查看 wiki,了解有关支持模块的更多信息。
下表列出了该工具支持的服务以及您需要使用的一些示例服务 URL 才能利用它。单击下面列出的任何服务,获取有关如何配置爱普瑞斯以访问它们的更多详细信息。
通知服务 | 服务编号 | 默认端口 | 示例语法 |
---|---|---|---|
爱普瑞斯API | 通知:// 或通知:// | (TCP)80 或 443 | apprise://主机名/令牌 |
AWSSES | 会话:// | (TCP)443 | ses://用户@域/AccessKeyID/AccessSecretKey/RegionName ses://用户@域/AccessKeyID/AccessSecretKey/RegionName/email1/email2/emailN |
吠 | 吠:// | (TCP)80 或 443 | 树皮://主机名 bark://主机名/设备密钥 bark://主机名/device_key1/device_key2/device_keyN barks://主机名 barks://主机名/设备密钥 barks://主机名/device_key1/device_key2/device_keyN |
颂扬 | 吟诵:// | (TCP)443 | chantify://token |
不和谐 | 不和谐:// | (TCP)443 | 不和谐://webhook_id/webhook_token Discord://avatar@webhook_id/webhook_token |
恩比 | emby:// 或 embys:// | (TCP)8096 | emby://用户@主机名/ emby://用户名:密码@主机名 |
谜2 | enigma2:// 或 enigma2s:// | (TCP)80 或 443 | enigma2://主机名 |
流式细胞仪 | fcm:// | (TCP)443 | fcm://project@apikey/DEVICE_ID fcm://project@apikey/#TOPIC fcm://project@apikey/DEVICE_ID1/#topic1/#topic2/DEVICE_ID2/ |
飞书 | 飞书:// | (TCP)443 | 飞书://token |
群 | 群:// | (TCP)443 | 羊群://令牌 羊群://机器人名称@token 羊群://app_token/u:用户ID 羊群://app_token/g:channel_id 羊群://app_token/u:用户id/g:channel_id |
谷歌聊天 | 聊天室:// | (TCP)443 | gchat://工作空间/密钥/令牌 |
戈蒂菲 | gotify:// 或gotifys:// | (TCP)80 或 443 | gotify://主机名/令牌 gotifys://主机名/令牌?优先级=高 |
咆哮 | 咆哮:// | (UDP)23053 | 咆哮://主机名 咆哮://主机名:端口号 咆哮://密码@主机名 咆哮://密码@主机名:端口 注意:您还可以使用 get 参数版本,它可以允许咆哮请求使用较旧的 v1.x 协议进行操作。示例如下:growl://hostname?version=1 |
行会 | 公会:// | (TCP)443 | guilded://webhook_id/webhook_token guilded://avatar@webhook_id/webhook_token |
家庭助理 | hassio:// 或 hassios:// | (TCP)8123 或 443 | hassio://主机名/accesstoken hassio://用户@主机名/accesstoken hassio://用户:密码@主机名:端口/accesstoken hassio://主机名/可选/路径/accesstoken |
IFTT | ifttt:// | (TCP)443 | ifttt://webhooksID/事件 ifttt://webhooksID/Event1/Event2/EventN ifttt://webhooksID/Event1/?+Key=Value ifttt://webhooksID/Event1/?-Key=value1 |
加入 | 加入:// | (TCP)443 | 加入://apikey/设备 加入://apikey/device1/device2/deviceN/ 加入://apikey/组 加入://apikey/groupA/groupB/groupN 加入://apikey/DeviceA/groupA/groupN/DeviceN/ |
科迪 | 科迪://或科迪斯:// | (TCP)8080 或 443 | kodi://主机名 kodi://用户@主机名 kodi://用户:密码@主机名:端口 |
库穆洛斯 | 库穆洛斯:// | (TCP)443 | kumulos://apikey/serverkey |
公制时间 | 拉米克:// | (TCP)443 | lametric://apikey@device_ipaddr lametric://apikey@主机名:端口 lametric://client_id@client_secret |
线 | 线:// | (TCP)443 | 行://令牌@用户 行://令牌/用户1/用户2/用户N |
月海 | 月海:// | (TCP)80 或 443 | lunasea://用户:pass@+FireBaseDevice/ lunasea://用户:pass@FireBaseUser/ lunasea://用户:pass@主机名/+FireBaseDevice/ lunasea://用户:pass@主机名/@FireBaseUser/ |
邮件枪 | 邮件枪:// | (TCP)443 | mailgun://用户@主机名/apikey mailgun://用户@主机名/apikey/电子邮件 mailgun://用户@主机名/apikey/email1/email2/emailN mailgun://user@hostname/apikey/?name="From%20User" |
乳齿象 | 乳齿象:// 或乳齿象:// | (TCP)80 或 443 | 乳齿象://access_key@主机名 乳齿象://access_key@主机名/@用户 乳齿象://access_key@主机名/@user1/@user2/@userN |
矩阵 | 矩阵://或矩阵:// | (TCP)80 或 443 | 矩阵://主机名 矩阵://用户@主机名 矩阵://用户:pass@主机名:端口/#room_alias 矩阵://用户:pass@主机名:端口/!room_id 矩阵://用户:pass@主机名:端口/#room_alias/!room_id/#room2 矩阵://token@主机名:端口/?webhook=matrix 矩阵://用户:token@主机名/?webhook=slack&format=markdown |
最重要的 | mmmost:// 或 mmmosts:// | (TCP)8065 | mmost://主机名/authkey mmost://主机名:80/authkey mmmost://用户@主机名:80/authkey mmost://主机名/authkey?channel=channel mmosts://主机名/authkey mmosts://用户@主机名/authkey |
Microsoft Power 自动化/工作流程 (MSTeams) | 工作流程:// | (TCP)443 | 工作流程://工作流程ID/签名/ |
微软团队 | 微软团队:// | (TCP)443 | msteams://TokenA/TokenB/TokenC/ |
米斯基 | misskey:// 或 misskeys:// | (TCP)80 或 443 | misskey://access_token@主机名 |
MQTT | mqtt:// 或 mqtts:// | (TCP) 1883 或 8883 | mqtt://主机名/主题 mqtt://用户@主机名/主题 mqtts://用户:pass@主机名:9883/topic |
下一云 | ncloud:// 或 nclouds:// | (TCP)80 或 443 | ncloud://adminuser:pass@host/用户 nclouds://adminuser:pass@host/User1/User2/UserN |
下一个云话 | nctalk:// 或 nctalks:// | (TCP)80 或 443 | nctalk://用户:pass@主机/RoomId nctalks://用户:pass@host/RoomId1/RoomId2/RoomIdN |
诺蒂卡 | 通知:// | (TCP)443 | 通知://令牌/ |
通知者 | 通知:// | (TCP)443 | notifiarr://apikey/#channel notifiarr://apikey/#channel1/#channel2/#channeln |
通知 | 通知:// | (TCP)443 | notifico://ProjectID/MessageHook/ |
NTFY | ntfy:// | (TCP)80 或 443 | ntfy://主题/ ntfys://主题/ |
办公室365 | o365:// | (TCP)443 | o365://TenantID:AccountEmail/ClientID/ClientSecret o365://TenantID:AccountEmail/ClientID/ClientSecret/TargetEmail o365://TenantID:AccountEmail/ClientID/ClientSecret/TargetEmail1/TargetEmail2/TargetEmailN |
单一信号 | 一个信号:// | (TCP)443 | onesignal://AppID@APIKey/PlayerID onesignal://TemplateID:AppID@APIKey/UserID onesignal://AppID@APIKey/#IncludeSegment onesignal://AppID@APIKey/邮箱 |
奥普斯吉尼 | 操作精灵:// | (TCP)443 | opsgenie://APIKey opsgenie://APIKey/用户ID opsgenie://APIKey/#团队 opsgenie://APIKey/*时间表 opsgenie://APIKey/^升级 |
寻呼机任务 | 寻呼任务:// | (TCP)443 | pagerduty://IntegrationKey@ApiKey pagerduty://IntegrationKey@ApiKey/Source/Component |
寻呼树 | 寻呼树:// | (TCP)443 | pagertree://integration_id |
解析平台 | parsep:// 或 parseps:// | (TCP)80 或 443 | parsep://AppID:MasterKey@主机名 parseps://AppID:MasterKey@主机名 |
爆米花通知 | 爆米花:// | (TCP)443 | 爆米花://ApiKey/ToPhoneNo 爆米花://ApiKey/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ 爆米花://ApiKey/ToEmail 爆米花://ApiKey/ToEmail1/ToEmail2/ToEmailN/ 爆米花://ApiKey/ToPhoneNo1/ToEmail1/ToPhoneNoN/ToEmailN |
徘徊 | 徘徊:// | (TCP)443 | 徘徊://apikey 徘徊://apikey/providerkey |
推子弹 | pbul:// | (TCP)443 | pbul://访问令牌 pbul://accesstoken/#channel pbul://accesstoken/A_DEVICE_ID pbul://accesstoken/[email protected] pbul://accesstoken/#channel/#channel2/[email protected]/DEVICE |
推射 | pjet:// 或 pjets:// | (TCP)80 或 443 | pjet://主机名/秘密 pjet://主机名:端口/秘密 pjets://secret@主机名/secret pjets://主机名:端口/秘密 |
推(Techulus) | 推:// | (TCP)443 | 推送://apikey/ |
推 | 推:// | (TCP)443 | 推送://appkey/appsecret/ 推://appkey/appsecret/#ChannelAlias 推://appkey/appsecret/#ChannelAlias1/#ChannelAlias2/#ChannelAliasN 推://appkey/appsecret/@UserPushedID 推://appkey/appsecret/@UserPushedID1/@UserPushedID2/@UserPushedIDN |
推我 | 推我:// | (TCP)443 | 推我://令牌/ |
推倒 | 贫困:// | (TCP)443 | pover://用户@token pover://user@token/DEVICE pover://user@token/DEVICE1/DEVICE2/DEVICEN 注意:您必须同时指定您的 user_id 和 token |
推送安全 | psafer:// 或 psafers:// | (TCP)80 或 443 | psafer://私钥 psafers://privatekey/DEVICE psafer://privatekey/DEVICE1/DEVICE2/DEVICEN |
爱出风头 | 爱出风头:// | (TCP)443 | 爱出风头://apikey/DEVICE Pushy://apikey/DEVICE1/DEVICE2/DEVICEN Pushy://apikey/TOPIC Pushy://apikey/TOPIC1/TOPIC2/TOPICN |
推鹿 | Pushdeer:// 或 Pushdeers:// | (TCP)80 或 443 | Pushdeer://pushKey Pushdeer://主机名/pushKey Pushdeer://主机名:端口/pushKey |
红迪网 | 红迪网:// | (TCP)443 | reddit://用户:密码@app_id/app_secret/subreddit reddit://用户:密码@app_id/app_secret/sub1/sub2/subN |
反叛 | 反叛:// | (TCP)443 | 反抗://bottoken/ChannelID 反抗://bottoken/ChannelID1/ChannelID2/ChannelIDN |
火箭聊天 | 火箭:// 或火箭:// | (TCP)80 或 443 | Rocket://用户:密码@主机名/RoomID/频道 Rockets://用户:密码@主机名:443/#Channel1/#Channel1/RoomID Rocket://用户:密码@主机名/#频道 Rocket://webhook@主机名 Rockets://webhook@主机名/@User/#Channel |
系统日志 | rsyslog:// | (UDP)514 | rsyslog://主机名 rsyslog://主机名/设施 |
里弗 | 里弗:// | (TCP)443 | ryver://组织/令牌 ryver://botname@Organization/Token |
发送网格 | 发送网格:// | (TCP)443 | sendgrid://APIToken:FromEmail/ sendgrid://APIToken:FromEmail/ToEmail sendgrid://APIToken:FromEmail/ToEmail1/ToEmail2/ToEmailN/ |
服务器通道 | 尚:// | (TCP)443 | schan://发送密钥/ |
信号API | 信号:// 或信号:// | (TCP)80 或 443 | 信号://主机名:端口/FromPhoneNo 信号://主机名:端口/FromPhoneNo/ToPhoneNo 信号://主机名:端口/FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
简单推送 | 喷:// | (TCP)443 | spush://apikey spush://salt:密码@apikey spush://apikey?event=Apprise |
松弛 | 松弛:// | (TCP)443 | 松弛://TokenA/TokenB/TokenC/ slack://TokenA/TokenB/TokenC/Channel slack://botname@TokenA/TokenB/TokenC/Channel 松弛://用户@TokenA/TokenB/TokenC/Channel1/Channel2/ChannelN |
SMTP2Go | smtp2go:// | (TCP)443 | smtp2go://用户@主机名/apikey smtp2go://用户@主机名/apikey/电子邮件 smtp2go://用户@主机名/apikey/email1/email2/emailN smtp2go://user@主机名/apikey/?name="From%20User" |
星火邮报 | 火花邮报:// | (TCP)443 | Sparkpost://用户@主机名/apikey Sparkpost://用户@主机名/apikey/电子邮件 SparkPost://用户@主机名/apikey/email1/email2/emailN sparkpost://user@hostname/apikey/?name="From%20User" |
斯普朗克 | splunk:// 或 victorops:/ | (TCP)443 | splunk://route_key@apikey splunk://route_key@apikey/entity_id |
流实验室 | strmlabs:// | (TCP)443 | strmlabs://AccessToken/ strmlabs://AccessToken/?name=名称&identifier=identifier&金额=0¤cy=USD |
Synology 聊天 | Synology:// 或 Synology:// | (TCP)80 或 443 | Synology://主机名/令牌 Synology://主机名:端口/令牌 |
系统日志 | 系统日志:// | 不适用 | 系统日志:// 系统日志://设施 |
电报 | tgram:// | (TCP)443 | tgram://bottoken/ChatID tgram://bottoken/ChatID1/ChatID2/ChatIDN |
叽叽喳喳 | 叽叽喳喳:// | (TCP)443 | 推特://CKey/CSecret/AKey/ASecret 推特://用户@CKey/CSecret/AKey/ASecret 推特://CKey/CSecret/AKey/ASecret/User1/User2/User2 推特://CKey/CSecret/AKey/ASecret?mode=tweet |
捻 | 捻:// | (TCP)443 | 扭曲://密码:登录 扭曲://密码:登录/#频道 扭曲://密码:登录/#team:频道 扭曲://密码:登录/#team:channel1/channel2/#team3:channel |
Webex 团队(思科) | wxteams:// | (TCP)443 | wxteams://令牌 |
微康机器人 | 微康机器人:// | (TCP)443 | wecombot://BotKey |
Whatsapp:// | (TCP)443 | Whatsapp://AccessToken@FromPhoneID/ToPhoneNo Whatsapp://模板:AccessToken@FromPhoneID/ToPhoneNo | |
WxPusher | wxpusher:// | (TCP)443 | wxpusher://AppToken@UserID1/UserID2/UserIDN wxpusher://AppToken@Topic1/Topic2/Topic3 wxpusher://AppToken@UserID1/Topic1/ |
西安BMC | xbmc:// 或 xbmcs:// | (TCP)8080 或 443 | xbmc://主机名 xbmc://用户@主机名 xbmc://用户:密码@主机名:端口 |
祖利普聊天 | 祖利普:// | (TCP)443 | zulip://botname@Organization/Token zulip://botname@Organization/Token/Stream zulip://botname@Organization/Token/Email |
通知服务 | 服务编号 | 默认端口 | 示例语法 |
---|---|---|---|
非洲人说话 | 谈话:// | (TCP)443 | atalk://AppUser@ApiKey/ToPhoneNo atalk://AppUser@ApiKey/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
自动数据包报告系统 (ARPS) | aprs:// | (TCP)10152 | aprs://用户:pass@callsign aprs://用户:pass@callsign1/callsign2/callsignN |
AWS社交网络服务 | sns:// | (TCP)443 | sns://AccessKeyID/AccessSecretKey/RegionName/+PhoneNo sns://AccessKeyID/AccessSecretKey/RegionName/+PhoneNo1/+PhoneNo2/+PhoneNoN sns://AccessKeyID/AccessSecretKey/RegionName/Topic sns://AccessKeyID/AccessSecretKey/RegionName/Topic1/Topic2/TopicN |
群发短信 | 批量短信:// | (TCP)443 | bulksms://用户名:密码@ToPhoneNo bulksms://用户:密码@ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
散装VS | 批量vs:// | (TCP)443 | 批量vs://用户:密码@FromPhoneNo bulkvs://用户:密码@FromPhoneNo/ToPhoneNo bulkvs://用户:密码@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
突发短信 | 突发短信:// | (TCP)443 | burstsms://ApiKey:ApiSecret@FromPhoneNo/ToPhoneNo burstsms://ApiKey:ApiSecret@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
点击发送 | 点击发送:// | (TCP)443 | clicksend://用户:pass@电话号码 clicksend://用户:pass@ToPhoneNo1/ToPhoneNo2/ToPhoneNoN |
达普网 | 达普网:// | (TCP)80 | dapnet://用户:pass@callsign dapnet://用户:pass@callsign1/callsign2/callsignN |
D7网络 | d7sms:// | (TCP)443 | d7sms://token@电话号码 d7sms://token@ToPhoneNo1/ToPhoneNo2/ToPhoneNoN |
钉钉 | 钉钉:// | (TCP)443 | 钉钉://token/ dingtalk://token/ToPhoneNo dingtalk://token/ToPhoneNo1/ToPhoneNo2/ToPhoneNo1/ |
免费移动 | 免费手机:// | (TCP)443 | 免费手机://用户@密码/ |
http短信 | https:// | (TCP)443 | httpsms://ApiKey@FromPhoneNo httpsms://ApiKey@FromPhoneNo/ToPhoneNo httpsms://ApiKey@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
卡韦内加尔 | 卡文内加尔:// | (TCP)443 | 卡文尼加://ApiKey/ToPhoneNo 卡文尼加://FromPhoneNo@ApiKey/ToPhoneNo 卡文尼加://ApiKey/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN |
消息鸟 | 消息鸟:// | (TCP)443 | msgbird://ApiKey/FromPhoneNo msgbird://ApiKey/FromPhoneNo/ToPhoneNo msgbird://ApiKey/FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
味精91 | 消息91:// | (TCP)443 | msg91://TemplateID@AuthKey/ToPhoneNo msg91://TemplateID@AuthKey/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
普利沃 | 普利沃:// | (TCP)443 | plivo://AuthID@Token@FromPhoneNo plivo://AuthID@Token/FromPhoneNo/ToPhoneNo plivo://AuthID@Token/FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
七 | 七:// | (TCP)443 | 七://ApiKey/FromPhoneNo 七://ApiKey/FromPhoneNo/ToPhoneNo 七://ApiKey/FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
法国无线电公司 (SFR) | sfr:// | (TCP)443 | sfr://用户:密码>@spaceId/ToPhoneNo sfr://用户:密码>@spaceId/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
信号API | 信号:// 或信号:// | (TCP)80 或 443 | 信号://主机名:端口/FromPhoneNo 信号://主机名:端口/FromPhoneNo/ToPhoneNo 信号://主机名:端口/FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
辛奇 | 辛奇:// | (TCP)443 | sinch://ServicePlanId:ApiToken@FromPhoneNo sinch://ServicePlanId:ApiToken@FromPhoneNo/ToPhoneNo sinch://ServicePlanId:ApiToken@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ sinch://ServicePlanId:ApiToken@ShortCode/ToPhoneNo sinch://ServicePlanId:ApiToken@ShortCode/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
短信鹰 | smseagle:// 或 smseagles:// | (TCP)80 或 443 | smseagles://主机名:端口/ToPhoneNo smseagles://主机名:端口/@ToContact smseagles://主机名:端口/#ToGroup smseagles://主机名:端口/ToPhoneNo1/#ToGroup/@ToContact/ |
短信管理器 | 短信管理器:// | (TCP)443 | smsmgr://ApiKey@ToPhoneNo smsmgr://ApiKey@ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
三马网关 | 三马:// | (TCP)443 | Threema://GatewayID@secret/ToPhoneNo Threema://GatewayID@secret/ToEmail Threema://GatewayID@secret/ToThreemaID/ Threema://GatewayID@secret/ToEmail/ToThreemaID/ToPhoneNo/... |
特威利奥 | twilio:// | (TCP)443 | twilio://AccountSid:AuthToken@FromPhoneNo twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo?apikey=Key twilio://AccountSid:AuthToken@ShortCode/ToPhoneNo twilio://AccountSid:AuthToken@ShortCode/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
语音管理系统 | voipms:// | (TCP)443 | voipms://密码:电子邮件/FromPhoneNo voipms://密码:电子邮件/FromPhoneNo/ToPhoneNo voipms://密码:电子邮件/FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
Vonage(以前称为 Nexmo) | 内克斯莫:// | (TCP)443 | nexmo://ApiKey:ApiSecret@FromPhoneNo nexmo://ApiKey:ApiSecret@FromPhoneNo/ToPhoneNo nexmo://ApiKey:ApiSecret@FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ |
通知服务 | 服务编号 | 默认端口 | 示例语法 |
---|---|---|---|
Linux DBus 通知 | dbus:// qt:// 油嘴滑舌:// kde:// | 不适用 | dbus:// qt:// 油嘴滑舌:// kde:// |
Linux Gnome 通知 | 侏儒:// | 不适用 | 侏儒:// |
MacOS X 通知 | macOS:// | 不适用 | macOS:// |
Windows 通知 | 视窗:// | 不适用 | 视窗:// |
服务编号 | 默认端口 | 示例语法 |
---|---|---|
邮寄地址:// | (TCP)25 | mailto://userid:[email protected] mailto://domain.com?user=用户 ID&pass=密码 mailto://domain.com:2525?user=userid&pass=密码 mailto://[email protected]&pass=密码 mailto://mySendingUsername:[email protected][email protected] mailto://userid:[email protected]?smtp=mail.example.com&[email protected]&name=no%20reply |
邮件地址:// | (TCP)587 | mailtos://userid:[email protected] mailtos://domain.com?user=userid&pass=密码 mailtos://domain.com:465?user=userid&pass=密码 mailtos://[email protected]&pass=密码 mailtos://mySendingUsername:[email protected][email protected] mailtos://userid:[email protected]?smtp=mail.example.com&[email protected]&name=no%20reply |
Apprise 内置了一些电子邮件服务(例如 yahoo、fastmail、hotmail、gmail 等),大大简化了 mailto:// 服务。请在此处查看更多详细信息。
邮寄法 | 服务编号 | 默认端口 | 示例语法 |
---|---|---|---|
形式 | 表格://或表格:// | (TCP)80 或 443 | 形式://主机名 形式://用户@主机名 形式://用户:密码@主机名:端口 形式://主机名/a/path/to/post/to |
JSON | json:// 或 jsons:// | (TCP)80 或 443 | json://主机名 json://用户@主机名 json://用户:密码@主机名:端口 json://主机名/a/path/to/post/to |
XML | xml:// 或 xmls:// | (TCP)80 或 443 | xml://主机名 xml://用户@主机名 xml://用户:密码@主机名:端口 xml://主机名/a/path/to/post/to |
最简单的方法是从 pypi 安装这个包:
pip install apprise
Apprise 还打包为 RPM,并通过支持 CentOS、Redhat、Rocky、Oracle Linux 等的 EPEL 提供。
# Follow instructions on https://docs.fedoraproject.org/en-US/epel
# to get your system connected up to EPEL and then:
# Redhat/CentOS 7.x users
yum install apprise
# Redhat/CentOS 8.x+ and/or Fedora Users
dnf install apprise
您还可以查看 Apprise 的图形版本,通过可管理的网页集中您的配置和通知。
该软件包还提供了一个名为apprise的小型命令行界面 (CLI) 工具。如果您知道要通知的服务器 URL,则只需在命令行上提供所有这些 URL 并以这种方式发送通知即可:
# Send a notification to as many servers as you want
# as you can easily chain one after another (the -vv provides some
# additional verbosity to help let you know what is going on):
apprise -vv -t ' my title ' -b ' my notification body '
' mailto://myemail:[email protected] '
' pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b '
# If you don't specify a --body (-b) then stdin is used allowing
# you to use the tool as part of your every day administration:
cat /proc/cpuinfo | apprise -vv -t ' cpu info '
' mailto://myemail:[email protected] '
# The title field is totally optional
uptime | apprise -vv
' discord:///4174216298/JHMHI8qBe7bk2ZwO5U711o3dV_js '
没有人愿意将自己的凭据公开给所有人在命令行上查看。没问题, apprise还支持配置文件。它可以处理特定的 YAML 格式或非常简单的 TEXT 格式。您还可以通过 HTTP 查询拉取这些配置文件!您可以在此处阅读有关配置文件的预期结构的更多信息。
# By default if no url or configuration is specified apprise will attempt to load
# configuration files (if present) from:
# ~/.apprise
# ~/.apprise.yaml
# ~/.config/apprise.conf
# ~/.config/apprise.yaml
# /etc/apprise.conf
# /etc/apprise.yaml
# Also a subdirectory handling allows you to leverage plugins
# ~/.apprise/apprise
# ~/.apprise/apprise.yaml
# ~/.config/apprise/apprise.conf
# ~/.config/apprise/apprise.yaml
# /etc/apprise/apprise.yaml
# /etc/apprise/apprise.conf
# Windows users can store their default configuration files here:
# %APPDATA%/Apprise/apprise.conf
# %APPDATA%/Apprise/apprise.yaml
# %LOCALAPPDATA%/Apprise/apprise.conf
# %LOCALAPPDATA%/Apprise/apprise.yaml
# %ALLUSERSPROFILE%Appriseapprise.conf
# %ALLUSERSPROFILE%Appriseapprise.yaml
# %PROGRAMFILES%Appriseapprise.conf
# %PROGRAMFILES%Appriseapprise.yaml
# %COMMONPROGRAMFILES%Appriseapprise.conf
# %COMMONPROGRAMFILES%Appriseapprise.yaml
# The configuration files specified above can also be identified with a `.yml`
# extension or even just entirely removing the `.conf` extension altogether.
# If you loaded one of those files, your command line gets really easy:
apprise -vv -t ' my title ' -b ' my notification body '
# If you want to deviate from the default paths or specify more than one,
# just specify them using the --config switch:
apprise -vv -t ' my title ' -b ' my notification body '
--config=/path/to/my/config.yml
# Got lots of configuration locations? No problem, you can specify them all:
# Apprise can even fetch the configuration from over a network!
apprise -vv -t ' my title ' -b ' my notification body '
--config=/path/to/my/config.yml
--config=https://localhost/my/apprise/config
Apprise 还支持文件附件!根据需要指定通知的任意数量的附件。
# Send a funny image you found on the internet to a colleague:
apprise -vv --title ' Agile Joke '
--body ' Did you see this one yet? '
--attach https://i.redd.it/my2t4d2fx0u31.jpg
' mailto://myemail:[email protected] '
# Easily send an update from a critical server to your dev team
apprise -vv --title ' system crash '
--body ' I do not think Jim fixed the bug; see attached... '
--attach /var/log/myprogram.log
--attach /var/debug/core.2345
--tag devteam
要创建您自己的自定义schema://
钩子以便您可以触发您自己的自定义代码,只需包含@notify
装饰器来包装您的函数。
from apprise . decorators import notify
#
# The below assumes you want to catch foobar:// calls:
#
@ notify ( on = "foobar" , name = "My Custom Foobar Plugin" )
def my_custom_notification_wrapper ( body , title , notify_type , * args , ** kwargs ):
"""My custom notification function that triggers on all foobar:// calls
"""
# Write all of your code here... as an example...
print ( "{}: {} - {}" . format ( notify_type . upper (), title , body ))
# Returning True/False is a way to relay your status back to Apprise.
# Returning nothing (None by default) is always interpreted as a Success
一旦定义了自定义挂钩,您只需在运行时告诉 Apprise 它在哪里。
# By default if no plugin path is specified apprise will attempt to load
# all plugin files (if present) from the following directory paths:
# ~/.apprise/plugins
# ~/.config/apprise/plugins
# /var/lib/apprise/plugins
# Windows users can store their default plugin files in these directories:
# %APPDATA%/Apprise/plugins
# %LOCALAPPDATA%/Apprise/plugins
# %ALLUSERSPROFILE%Appriseplugins
# %PROGRAMFILES%Appriseplugins
# %COMMONPROGRAMFILES%Appriseplugins
# If you placed your plugin file within one of the directories already defined
# above, then your call simply needs to look like:
apprise -vv --title ' custom override '
--body ' the body of my message '
foobar: \
# However you can over-ride the path like so
apprise -vv --title ' custom override '
--body ' the body of my message '
--plugin-path /path/to/my/plugin.py
foobar: \
您可以在此处阅读有关创建自己的自定义通知和/或挂钩的更多信息。
使用命令行界面 (CLI) 的用户还可以利用环境变量来预设默认设置:
多变的 | 描述 |
---|---|
APPRISE_URLS | 如果没有在命令行上明确指定,则指定要通知的默认 URL。如果指定了--config ( -c ),则这将覆盖对此变量的任何引用。使用空格和/或逗号 ( , ) 来分隔多个条目。 |
APPRISE_CONFIG_PATH | 显式指定要使用的配置搜索路径(覆盖默认值)。此处定义的路径必须指向要打开/引用的绝对文件名。使用分号 ( ; )、换行符 ( n ) 和/或回车符 ( r ) 来分隔多个条目。 |
APPRISE_PLUGIN_PATH | 显式指定要使用的自定义插件搜索路径(覆盖默认值)。使用分号 ( ; )、换行符 ( n ) 和/或回车符 ( r ) 来分隔多个条目。 |
APPRISE_STORAGE_PATH | 显式指定要使用的持久存储路径(覆盖默认值)。 |
要从 python 应用程序内发送通知,只需执行以下操作:
import apprise
# Create an Apprise instance
apobj = apprise . Apprise ()
# Add all of the notification services by their server url.
# A sample email notification:
apobj . add ( 'mailto://myuserid:[email protected]' )
# A sample pushbullet notification
apobj . add ( 'pbul://o.gn5kj6nfhv736I7jC3cj3QLRiyhgl98b' )
# Then notify these services any time you desire. The below would
# notify all of the services loaded into our Apprise object.
apobj . notify (
body = 'what a great notification service!' ,
title = 'my notification title' ,
)
开发人员还需要访问配置文件。好消息是它们的使用只涉及声明Apprise对象可以摄取的另一个对象(称为AppriseConfig )。您还可以根据需要随意混合和匹配配置和通知条目!您可以在此处阅读有关配置文件的预期结构的更多信息。
import apprise
# Create an Apprise instance
apobj = apprise . Apprise ()
# Create an Config instance
config = apprise . AppriseConfig ()
# Add a configuration source:
config . add ( '/path/to/my/config.yml' )
# Add another...
config . add ( 'https://myserver:8080/path/to/config' )
# Make sure to add our config into our apprise object
apobj . add ( config )
# You can mix and match; add an entry directly if you want too
# In this entry we associate the 'admin' tag with our notification
apobj . add ( 'mailto://myuser:[email protected]' , tag = 'admin' )
# Then notify these services any time you desire. The below would
# notify all of the services that have not been bound to any specific
# tag.
apobj . notify (
body = 'what a great notification service!' ,
title = 'my notification title' ,
)
# Tagging allows you to specifically target only specific notification
# services you've loaded:
apobj . notify (
body = 'send a notification to our admin group' ,
title = 'Attention Admins' ,
# notify any services tagged with the 'admin' tag
tag = 'admin' ,
)
# If you want to notify absolutely everything (regardless of whether
# it's been tagged or not), just use the reserved tag of 'all':
apobj . notify (
body = 'send a notification to our admin group' ,
title = 'Attention Admins' ,
# notify absolutely everything loaded, regardless on wether
# it has a tag associated with it or not:
tag = 'all' ,
)
使用 Apprise API 可以非常轻松地发送附件:
import apprise
# Create an Apprise instance
apobj = apprise . Apprise ()
# Add at least one service you want to notify
apobj . add ( 'mailto://myuser:[email protected]' )
# Then send your attachment.
apobj . notify (
title = 'A great photo of our family' ,
body = 'The flash caused Jane to close her eyes! hah! :)' ,
attach = '/local/path/to/my/DSC_003.jpg' ,
)
# Send a web based attachment too! In the below example, we connect to a home
# security camera and send a live image to an email. By default remote web
# content is cached, but for a security camera we might want to call notify
# again later in our code, so we want our last image retrieved to expire(in
# this case after 3 seconds).
apobj . notify (
title = 'Latest security image' ,
attach = 'http://admin:password@hikvision-cam01/ISAPI/Streaming/channels/101/picture?cache=3'
)
要发送多个附件,只需使用列表、集合或元组即可:
import apprise
# Create an Apprise instance
apobj = apprise . Apprise ()
# Add at least one service you want to notify
apobj . add ( 'mailto://myuser:[email protected]' )
# Now add all of the entries we're interested in:
attach = (
# ?name= allows us to rename the actual jpeg as found on the site
# to be another name when sent to our receipient(s)
'https://i.redd.it/my2t4d2fx0u31.jpg?name=FlyingToMars.jpg' ,
# Now add another:
'/path/to/funny/joke.gif' ,
)
# Send your multiple attachments with a single notify call:
apobj . notify (
title = 'Some good jokes.' ,
body = 'Hey guys, check out these!' ,
attach = attach ,
)
默认情况下,对于那些从 Apprise API 中构建的插件,根本不会加载任何自定义插件。加载自定义模块由开发人员自行决定。但如果您选择这样做,只需在初始化Apprise()
实例之前将路径引用包含在AppriseAsset()
对象中即可。
例如:
from apprise import Apprise
from apprise import AppriseAsset
# Prepare your Asset object so that you can enable the custom plugins to
# be loaded for your instance of Apprise...
asset = AppriseAsset ( plugin_paths = "/path/to/scan" )
# OR You can also generate scan more then one file too:
asset = AppriseAsset (
plugin_paths = [
# Iterate over all python libraries found in the root of the
# specified path. This is NOT a recursive (directory) scan; only
# the first level is parsed. HOWEVER, if a directory containing
# an __init__.py is found, it will be included in the load.
"/dir/containing/many/python/libraries" ,
# An absolute path to a plugin.py to exclusively load
"/path/to/plugin.py" ,
# if you point to a directory that has an __init__.py file found in
# it, then only that file is loaded (it's similar to point to a
# absolute .py file. Hence, there is no (level 1) scanning at all
# within the directory specified.
"/path/to/dir/library"
]
)
# Now that we've got our asset, we just work with our Apprise object as we
# normally do
aobj = Apprise ( asset = asset )
# If our new custom `foobar://` library was loaded (presuming we prepared
# one like in the examples above). then you would be able to safely add it
# into Apprise at this point
aobj . add ( 'foobar://' )
# Send our notification out through our foobar://
aobj . notify ( "test" )
您可以在此处阅读有关创建自己的自定义通知和/或挂钩的更多信息。
持久存储允许 Apprise 将重复发生的操作缓存到磁盘(可选)。这可以大大减少用于发送通知的开销。
Apprise 可以使用 3 种持久存储操作状态进行操作:
auto
:按需将收集的缓存信息刷新到文件系统。这个选项的重量非常轻。这是所有 CLI 使用的默认行为。flush
:在每个事务期间将所有缓存信息刷新到文件系统。memory
:有效禁用持久存储。每个使用的插件所需的任何数据缓存都是在内存中完成的。 Apprise 像在持久存储可用之前一样有效地运行。此设置可确保不会将所有内容写入磁盘。auto
或flush
运行。这是通过AppriseAsset()
对象完成的,并在本文档中进一步解释。 您可以在 CLI 调用中提供关键字storage
以查看可用的持久存储选项。
# List all of the occupied space used by Apprise's Persistent Storage:
apprise storage list
# list is the default option, so the following does the same thing:
apprise storage
# You can prune all of your storage older then 30 days
# and not accessed for this period like so:
apprise storage prune
# You can do a hard reset (and wipe all persistent storage) with:
apprise storage clean
您还可以通过添加标签和/或 URL 标识符来过滤结果。当您获得列表( apprise storage list
)时,您可能会看到:
# example output of 'apprise storage list':
1. f7077a65 0.00B unused
- matrixs://abcdef:****@synapse.example12.com/%23general?image=no&mode=off&version=3&msgtype...
tags: team
2. 0e873a46 81.10B active
- tgram://W...U//?image=False&detect=yes&silent=no&preview=no&content=before&mdv=v1&format=m...
tags: personal
3. abcd123 12.00B stale
(持久存储)缓存状态是:
unused
:此插件尚未将任何内容提交到磁盘以进行重用/缓存目的active
:该插件已将内容写入磁盘。或者至少,它已经准备好了一个可以写入的持久存储位置。stale
:系统检测到 URL 过去可能写入过的位置,但没有任何内容使用提供的 URL 链接到该位置。它可能会浪费空间或不再有任何用处。您可以通过在命令后指定URL ID (UID) 值来使用此信息来过滤结果。例如:
# The below commands continue with the example already identified above
# the following would match abcd123 (even though just ab was provided)
# The output would only list the 'stale' entry above
apprise storage list ab
# knowing our filter is safe, we could remove it
# the below command would not obstruct our other to URLs and would only
# remove our stale one:
apprise storage clean ab
# Entries can be filtered by tag as well:
apprise storage list --tag=team
# You can match on multiple URL ID's as well:
# The followin would actually match the URL ID's of 1. and .2 above
apprise storage list f 0
使用 CLI 时,持久存储默认设置为auto
操作模式,您可以通过在调用期间提供--storage-mode=
( -SM
) 来更改此设置。如果您想确保它始终设置为您选择的值。
有关持久存储的更多信息,请访问此处。
对于开发者来说,持久化存储默认设置为memory
的操作模式。
开发人员可以自行决定是否启用它(通过将其切换为auto
或flush
)。如果您选择这样做:就像在初始化Apprise()
实例之前将信息包含在AppriseAsset()
对象中一样简单。
例如:
from apprise import Apprise
from apprise import AppriseAsset
from apprise import PersistentStoreMode
# Prepare a location the persistent storage can write it's cached content to.
# By setting this path, this immediately assumes you wish to operate the
# persistent storage in the operational 'auto' mode
asset = AppriseAsset ( storage_path = "/path/to/save/data" )
# If you want to be more explicit and set more options, then you may do the
# following
asset = AppriseAsset (
# Set our storage path directory (minimum requirement to enable it)
storage_path = "/path/to/save/data" ,
# Set the mode... the options are:
# 1. PersistentStoreMode.MEMORY
# - disable persistent storage from writing to disk
# 2. PersistentStoreMode.AUTO
# - write to disk on demand
# 3. PersistentStoreMode.FLUSH
# - write to disk always and often
storage_mode = PersistentStoreMode . FLUSH
# The URL IDs are by default 8 characters in length. You can increase and
# decrease it's value here. The value must be > 2. The default value is 8
# if not otherwise specified
storage_idlen = 8 ,
)
# Now that we've got our asset, we just work with our Apprise object as we
# normally do
aobj = Apprise ( asset = asset )
有关持久存储的更多信息,请访问此处。
如果您有兴趣阅读有关此方法以及其他有关如何自定义自己的通知的方法的更多信息,请查看以下链接:
想要帮助爱普瑞斯变得更好吗?