{"id":34033950,"url":"https://github.com/harshit158/notipi","last_synced_at":"2026-04-05T18:33:14.315Z","repository":{"id":242443322,"uuid":"809535725","full_name":"harshit158/notipi","owner":"harshit158","description":"A package to deliver notifications via your telegram bot","archived":false,"fork":false,"pushed_at":"2025-02-23T14:47:19.000Z","size":1004,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-15T10:40:36.227Z","etag":null,"topics":["notification-system","telegram-bot"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/notipi/","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/harshit158.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}},"created_at":"2024-06-03T00:30:20.000Z","updated_at":"2025-02-23T14:47:22.000Z","dependencies_parsed_at":"2024-06-21T06:14:18.348Z","dependency_job_id":null,"html_url":"https://github.com/harshit158/notipi","commit_stats":null,"previous_names":["harshit158/notipi"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/harshit158/notipi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit158%2Fnotipi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit158%2Fnotipi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit158%2Fnotipi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit158%2Fnotipi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshit158","download_url":"https://codeload.github.com/harshit158/notipi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit158%2Fnotipi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31446526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-system","telegram-bot"],"created_at":"2025-12-13T19:26:19.390Z","updated_at":"2026-04-05T18:33:14.310Z","avatar_url":"https://github.com/harshit158.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![PyPI - Downloads](https://img.shields.io/pypi/dm/notipi) ![PyPI - Version](https://img.shields.io/pypi/v/notipi)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"Logo\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n## Introduction\n\n`notipi` is a python library to send custom notifications on Telegram and MacOS\u003cbr\u003e\n\nUse cases include:\n- Getting notified whenever a long running scripts finishes execution\n- Knowing whenever a milestone is reached during ML / DL trainings\n\n## Installation\n    $ pip install notipi \n\n## Setup\nIf you wish to use just the MacOS notifications and not Telegram - you don't need anymore steps and start using the library right away. Refer the Usage examples below.\n\nTo use Telegram - you would be needing two environment variables: `BOT_API_TOKEN` and `CHAT_ID`\n\n\u003cu\u003eTo get `BOT_API_TOKEN`:\u003c/u\u003e\n\n- In the telegram app, initiate conversation with `@BotFather` (you can also click [here](https://t.me/BotFather)).\n- Send `/newbot` as the message to `@BotFather` and provide a new name and username for your bot account as per the instructions.\n- `@BotFather` will reply with a unique api token - this is your `BOT_API_TOKEN` \u003cbr\u003e\n(Note: Detailed instructions to create a new bot can be found at [Telegram website](https://core.telegram.org/bots/features#creating-a-new-bot:~:text=and%20managing%20bots.-,Creating%20a%20new%20bot,-Use%20the%20/newbot))\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/bot_creation_steps.jpeg\" alt=\"Logo\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n\u003cu\u003eTo get `CHAT_ID`:\u003c/u\u003e\n- Once a new bot is created, send a dummy message to the bot via Telegram app so that your chat gets assigned an ID. \u003cbr\u003e\n- Run the following script with your `BOT_API_TOKEN` to get your `CHAT_ID`\n```python\nfrom notipi.notipi import get_chat_id\nget_chat_id(BOT_API_TOKEN)\n```\n\nThis will give the following output:\n```\nYour CHAT ID: 1234567890\n```\n\nOnce the `BOT_API_TOKEN` and `CHAT_ID` are obtained, set the environment variables\n\n    export BOT_API_TOKEN=\u003cbot_api_token\u003e\n    export CHAT_ID=\u003cchat_id\u003e\n\n## Usage\n\nOnce the required environment variables are in place, you can use `notipi` in the following ways to send messages via Telegram. \u003cbr\u003e\n(**NOTE**: If the environment variables are not set - the messages will be sent only via MacOS notifications by default)\n\n### (1) As a regular function\n\n```python\nfrom notipi.notipi import notify\n\ndef func():\n    for i in range(1000):\n        if i%100==0:\n            notify(f\"Currently at {i}\")\n```\n\n### (2) As a decorator\n```python\nfrom notipi.notipi import notify\n\n@notify\ndef func():\n    for i in range(1000):\n        pass\n```\n\nWhen `func()` is invoked - you will be notified once it finishes execution\n\n`NOTE`: Both Approaches (1) and (2) are compatible inside Jupyter Notebook as well\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"assets/notebook_screenshot.jpg\" width=\"900\"/\u003e\n\u003c/p\u003e\n\nOnce `func3()` is invoked - you will receive two notifications - first one after `func1()` is processed and second one after `func2()` is executed.\n\n### (3) As a command line tool\n    $ noticli -c python example.py\nA notification will be sent once `example.py` finishes execution\n\n\n## Roadmap\n- Extend compatibility to Windows platforms    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshit158%2Fnotipi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshit158%2Fnotipi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshit158%2Fnotipi/lists"}