{"id":28551775,"url":"https://github.com/4444tensei/notifywind","last_synced_at":"2025-07-03T17:31:12.088Z","repository":{"id":297141138,"uuid":"872165704","full_name":"4444TENSEI/NotifyWind","owner":"4444TENSEI","description":"Python消息推送集成SDK，统一主流平台接口。配置文件独立，无需改动现有项目。仅需将本仓库的plugin目录以及json配置文件放入你的项目目录→编辑json配置→在需要接收消息的位置调用函数NotifyWind()→传入标题和消息内容即可将任意消息推送到你手机上。消息接收平台已支持: pushplus(微信)、ntfy(APP)、Gotify(APP)，再不用去看繁杂的任务执行日志。","archived":false,"fork":false,"pushed_at":"2025-06-04T02:27:14.000Z","size":25,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T09:15:13.262Z","etag":null,"topics":["notification","script","sdk-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4444TENSEI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-14T00:07:49.000Z","updated_at":"2025-06-04T02:27:15.000Z","dependencies_parsed_at":"2025-06-08T04:30:39.085Z","dependency_job_id":null,"html_url":"https://github.com/4444TENSEI/NotifyWind","commit_stats":null,"previous_names":["4444tensei/notifywind"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/4444TENSEI/NotifyWind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4444TENSEI%2FNotifyWind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4444TENSEI%2FNotifyWind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4444TENSEI%2FNotifyWind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4444TENSEI%2FNotifyWind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4444TENSEI","download_url":"https://codeload.github.com/4444TENSEI/NotifyWind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4444TENSEI%2FNotifyWind/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263369509,"owners_count":23456313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notification","script","sdk-python"],"created_at":"2025-06-10T04:06:46.553Z","updated_at":"2025-07-03T17:31:12.073Z","avatar_url":"https://github.com/4444TENSEI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://testingcf.jsdelivr.net/gh/4444TENSEI/CDN/img/avatar/AngelDog/AngelDog-rounded.png\" alt=\"Logo\"\n    width=\"200\" height=\"200\"/\u003e\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eNotifyWind\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003ePython统一消息推送服务集成工具，皆在便捷集成第三方/开源自部署消息推送服务。例如你将自己的Python脚本集成本项目SDK，定时运行服务(器)监控、定时查成绩、定时签到、定时任务后，将运行状态直接发送微信or系统通知到你的手机上查看。\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Python-276DC3?style=for-the-badge\u0026logo=python\u0026logoColor=white\" /\u003e\n\u003c/p\u003e    \n\n\n\n\n\u003e ## 简介\n\n本SDK现已集成4个主流的消息服务（微信公众号pushplus、企业微信机器人、Gotify、ntfy）接口，配置简易、本体轻量，无需通过pip安装，只需clone本仓库至您的项目根目录下，修改根目录的`config.NotifyWind.json`配置文件为您的推送服务环境变量，引入推送函数即可一次性推送消息至多平台。\n\n\u003e ## 应用实例\n\n1. ### v0.1.0版本已集成于：[由云函数实现的HTTP服务定时监控+消息推送定时任务](https://github.com/4444TENSEI/NotifyMonitor)\n\n\n### 目前支持的推送服务：\n\n1. 微信公众号（每日免费200次调用次数）：`pushplus`\n2. 自部署服务（无调用限制，通过各自`APP`接收通知）：`ntfy`、`gotify`\n\n`华为云函数`+`pushplus微信推送`两家服务的免费额度非常够用，现在只需在你的Python定时任务中集成这个项目，部署到云函数上，配置定时运行，即可被动等待运行状态推送到手机上，个人用户只需申请一个pushplus账号，一小会就注册好了。\n\n### 基础调用：\n\n```\nfrom plugin.NotifyWind import NotifyWind\n\ntitle = \"自定义消息标题\"\nmessage = \"自定义消息内容\"\n\nNotifyWind(title=title, message=message)\n```\n\n## 环境变量/配置文件\n\n支持**同时推送**到多平台，下方示例中仅使用pushplus，实际还有ntfy和gotify的配置项，参考本仓库根目录下的`config.NotifyWind.json.example`\n\n更推荐使用`环境变量`方式，而不是写在实际配置文件中（开发环境还是需要使用本地json文件，自行去除项目根目录的`config.NotifyWind.json.example`的`.example`后缀即可，可自行删除不需要的推送服务键值对，此处debug控制调试语句不要删除）。\n\n```json\n{\n    \"pushplus\": {\n        \"token\": \"xxxxxxxxxxxxxxxxxxxx\"\n    },\n    \"ntfy\": {\n        \"server_url\": \"https://xxxxxx.com\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxx\",\n        \"priority\": 4\n    },\n    \"gotify\": {\n        \"server_url\": \"https://xxxxxx.com/message\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxx\",\n        \"priority\": 8\n    },\n    \"wechat\": {\n        \"server_url\": \"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxx\"\n    },\n    \"debug\": true\n}\n```\n\n\u003e # 免费部署到华为云函数\n\n此时此刻，你完全可以在仅仅修改配置文件的情况下直接进行部署了（除了pushplus实名需要一元钱），下方是针对未使用过华为云函数的用户所写的示例，老玩家也许不需要看了（提醒老玩家：环境变量键名为`NOTIFYWIND`）。\n\n\u003e ## 图文教程\n\n1. 拉取项目源码或者是直接点击[**前往下载**](https://github.com/4444TENSEI/NotifyMonitor/releases/latest)，找到`Source code(zip)`字样，下载最新版源码`ZIP`压缩包，用于上传到华为云函数\n2. 查看**图文部署教程**：[华为云函数部署Python定时任务](https://blog.yokaze.top/archives/930)，\n3. ※ 需要在**环境变量**中配置`键`为`NOTIFYWIND`，`值`就是下方json配置文件中的内容，关键部位自行修改\n\n\u003e ## 获取TOKEN\n\u003e\n\n- ### 获取`pushplus`的token：\n\n前往官网：[pushplus官网](https://www.pushplus.plus/push1.html)。注册、绑定微信公众号、实名，短短几分钟即可获取到token。\n\n- ### 获取`gotify`的token：\n\n什么？既然你都会部署了，在右上角APPS里面点`CREATE APPLICATION`创建一个不就出来了。\n\n- ### 获取`ntfy`的token：\n\n一般你部署下来是不需要的，如不需要可以在配置文件json中删掉这组键值对。\n\n如果你真的在自己在部署时设定了角色权限，那么在你的服务器上面运行\n\n- 如果你没有创建管理员，那么创建\n\n```\nntfy user add --role=admin Admin123\n```\n\n- 如果你没有生成token，那么生成（这里是100年有效期...）\n\n```\nntfy token add --expires=36500d --label=\"long-term-access\" Admin123\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4444tensei%2Fnotifywind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4444tensei%2Fnotifywind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4444tensei%2Fnotifywind/lists"}