{"id":16006353,"url":"https://github.com/george-miao/knotify","last_synced_at":"2025-10-10T04:32:56.271Z","repository":{"id":62574427,"uuid":"254324537","full_name":"George-Miao/Knotify","owner":"George-Miao","description":"A multi-platform notification tool. Support telegram, wechat, webhook, wirepusher and more","archived":false,"fork":false,"pushed_at":"2020-04-14T09:40:04.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-10T04:31:59.637Z","etag":null,"topics":["notification","python","telegram","webhook","wechat","wirepusher"],"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/George-Miao.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}},"created_at":"2020-04-09T09:14:30.000Z","updated_at":"2020-06-03T08:16:28.000Z","dependencies_parsed_at":"2022-11-03T18:38:49.022Z","dependency_job_id":null,"html_url":"https://github.com/George-Miao/Knotify","commit_stats":null,"previous_names":["georgemiao219/knotify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/George-Miao/Knotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/George-Miao%2FKnotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/George-Miao%2FKnotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/George-Miao%2FKnotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/George-Miao%2FKnotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/George-Miao","download_url":"https://codeload.github.com/George-Miao/Knotify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/George-Miao%2FKnotify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002674,"owners_count":26083442,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","python","telegram","webhook","wechat","wirepusher"],"created_at":"2024-10-08T11:41:04.887Z","updated_at":"2025-10-10T04:32:56.255Z","avatar_url":"https://github.com/George-Miao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Knotify\n\nKnotify is a simple tool that helps you to push notifications and other messages to the dedicated clients\nInclude Telegram Bot, Webhook, WirePusher, Wechat Bot (Server Chan)\n\n## Quick Start\nUse pip to install Knotify first:\n```shell\npip install knotify\n```\n\nThen get the \"key\" from the client you want to use:\n- [Webhook](#Webhook)\n- [Wechat](#Wechat)\n- [Telegram](#Telegram)\n- [WirePusher](#WirePusher)\n\nUse context manager for a quick and easy notification:\n```python\nfrom knotify import WirePusher\nasync def main():\n    async with WirePusher(\"Your_Token_From_WirePusher\") as w:\n        w.emit(\"FooBar\")\n```\n\nIf you want to keep the instance for a longer lifespan, remember to use ``await PusherInstance.close()`` afterwards:\n```python\nfrom knotify import WirePusher\nasync def main():\n    w = WirePusher(\"Your_Token_From_WirePusher\")            \n    await w.emit(\"Foo\")\n    await w.emit(\"Bar\")\n    await w.close()\n```\n## Pre-defined Pushers\n### Webhook\nThe \"key\" will be the url you want to post to itself\n\ne.g. [Discord Server Webhook](https://support.discordapp.com/hc/en-us/articles/228383668)\n\n### Wechat\nThe wechat client is [Server Chan(Server酱)](http://sc.ftqq.com/3.version) and the key will be `sckey`\n\n### Telegram\nThe telegram client is `tg_push_bot` from Fndroid. [Use Manual](https://github.com/Fndroid/tg_push_bot/blob/master/README.md)\n\n### WirePusher\n[WirePusher](http://wirepusher.com/) is an Android app that allows you to send push notifications right to your device.\n\n## Custom Pusher\nCreate a custom pusher by inheriting from `BasePusher`:\n```python\nclass CustomPusher(BasePusher):\n    pass\n```\nAnd all you need to do is to overload the `_push` function which will be invoked by `emit` function:\n```python\nasync def _push(self, message, **kwargs) -\u003e bool:\n    \"\"\"\n    Overload this function to create custom pusher\n    :param message: message to be sent\n    :param kwargs: all params to be sent\n        use function `_build_body` to build a dict for params\n    :return: Returns True if pushing is succeeded, Otherwise False\n    \"\"\"\n    pass\n```\nUse the built-in `aiohttp.ClientSession` to invoke http api and `self._check_result` to check result:\n```python\nasync def _push(self, message, **kwargs) -\u003e bool:\n    with self.s.get(\"api\", data=kwargs) as result:\n        return self._check_result(result)\n```\n\n\n## Requirement\n- Python 3.6+\n- aiohttp\n- \n\n## License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorge-miao%2Fknotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorge-miao%2Fknotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorge-miao%2Fknotify/lists"}