{"id":16212509,"url":"https://github.com/p4irin/telegram_notifier_bot","last_synced_at":"2025-04-07T21:49:28.095Z","repository":{"id":193259967,"uuid":"688430567","full_name":"p4irin/telegram_notifier_bot","owner":"p4irin","description":"Notify a Telegram user or group of events in e.g. a monitoring system or an IoT device.","archived":false,"fork":false,"pushed_at":"2023-09-08T20:40:23.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T19:52:45.045Z","etag":null,"topics":["iot","telegram","telegram-bot"],"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/p4irin.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}},"created_at":"2023-09-07T10:34:17.000Z","updated_at":"2025-02-19T22:34:00.000Z","dependencies_parsed_at":"2023-09-07T12:05:22.634Z","dependency_job_id":null,"html_url":"https://github.com/p4irin/telegram_notifier_bot","commit_stats":null,"previous_names":["p4irin/telegram_notifier_bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Ftelegram_notifier_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Ftelegram_notifier_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Ftelegram_notifier_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p4irin%2Ftelegram_notifier_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p4irin","download_url":"https://codeload.github.com/p4irin/telegram_notifier_bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737741,"owners_count":20987718,"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":["iot","telegram","telegram-bot"],"created_at":"2024-10-10T10:52:47.806Z","updated_at":"2025-04-07T21:49:28.042Z","avatar_url":"https://github.com/p4irin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram_notifier_bot - v1.0.0\n\nA simple package to send notifications to a Telegram user or group. \n\nE.g.\n\n- Send notifications triggered by some event\n  - in a monitoring system\n  - an IoT device\n  - a service\n\n## Installation\n\n### From PyPI\n\n```bash\n(venv) $ pip install telegram-notifier-bot\n(venv) $\n```\n\n### From GitHub\n\n```bash\n(venv) $ pip install git+https://github.com/p4irin/telegram_notifier_bot.git\n(venv) $\n```\n\n### Verify\n\n```bash\n(venv) $ python\nPython 3.8.10 (default, Jun  2 2021, 10:49:15) \n[GCC 9.4.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import telegram_notifier_bot\n\u003e\u003e\u003e telegram_notifier_bot.__version__\n'0.0.1'\n\u003e\u003e\u003e\n```\n\n## Usage\n\n### Prerequisite\n\n[Create a new Telegram bot](https://core.telegram.org/bots/features#creating-a-new-bot)\n\n### Send a notification\n\n```bash\n(venv) $ export TELEGRAM_BOT_TOKEN=\u003cYour Telegram bot token\u003e\n(venv) $ export TELEGRAM_CHAT_ID=\u003cRecipient(s) chat or group id\u003e\n(venv) $ export TELEGRAM_PATH_TO_PHOTO=\u003cFile system path to photo\u003e\n(venv) $ python\nPython 3.8.10 (default, Jun  2 2021, 10:49:15) \n[GCC 9.4.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import os\n\u003e\u003e\u003e from telegram_notifier_bot import Notifier\n\u003e\u003e\u003e token = os.getenv('TELEGRAM_BOT_TOKEN')\n\u003e\u003e\u003e chat_id = os.getenv('TELEGRAM_CHAT_ID')\n\u003e\u003e\u003e photo = os.getenv('TELEGRAM_PATH_TO_PHOTO')\n\u003e\u003e\u003e notifier = Notifier(token)\n\u003e\u003e\u003e notifier.send(\"We're out of coffee! Please fix ASAP!\", chat_id)\n\u003e\u003e\u003e notifier.send_photo(photo, chat_id)\n\u003e\u003e\u003e\n```\n\n## Reference\n\n- [The Telegram Bot API](https://core.telegram.org/bots/api)\n- [Requests: HTTP for Humans](https://requests.readthedocs.io/en/latest/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4irin%2Ftelegram_notifier_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4irin%2Ftelegram_notifier_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4irin%2Ftelegram_notifier_bot/lists"}