{"id":14977413,"url":"https://github.com/daskol/telepyth","last_synced_at":"2025-10-28T03:32:03.890Z","repository":{"id":57473892,"uuid":"89694679","full_name":"daskol/telepyth","owner":"daskol","description":"Telegram notification with IPython magics.","archived":false,"fork":false,"pushed_at":"2023-07-10T04:45:00.000Z","size":171,"stargazers_count":59,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-01T11:24:20.361Z","etag":null,"topics":["boltdb","bot","golang","ipython","ipython-magic","jupyter","jupyter-notebook","telegram","telegram-bot","telegram-notification"],"latest_commit_sha":null,"homepage":"","language":"Go","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/daskol.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":"2017-04-28T10:13:34.000Z","updated_at":"2024-07-31T13:36:45.000Z","dependencies_parsed_at":"2024-06-19T00:25:18.029Z","dependency_job_id":"6b637c38-6445-4a14-864f-38f2f2b9942f","html_url":"https://github.com/daskol/telepyth","commit_stats":{"total_commits":76,"total_committers":5,"mean_commits":15.2,"dds":"0.10526315789473684","last_synced_commit":"ea5562e5464f294fd255ae145329a05670754d4c"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Ftelepyth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Ftelepyth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Ftelepyth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Ftelepyth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daskol","download_url":"https://codeload.github.com/daskol/telepyth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238590596,"owners_count":19497350,"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":["boltdb","bot","golang","ipython","ipython-magic","jupyter","jupyter-notebook","telegram","telegram-bot","telegram-notification"],"created_at":"2024-09-24T13:55:36.877Z","updated_at":"2025-10-28T03:32:03.476Z","avatar_url":"https://github.com/daskol.png","language":"Go","readme":"# TelePyth\n\n*Telegram notification with IPython magics.*\n\n## Overview\n\n**TelePyth** (named */teləˈpaɪθ/*) \u0026mdash; a Telegram bot that is integrated\nwith IPython.  It provides an ability to send any text notification to user\nfrom Jupyter notebook or IPython CLI.\n\n### Bot Commands\n\nStart chat with [@telepyth\\_bot](https://telegram.me/telepyth_bot) and get\naccess token using `/start` command.  TelePyth Bot understands some other\nsimple commands. Type\n\n+ `/start` to begin interaction with bot;\n+ `/revoke` to revoke token issued before;\n+ `/last` to get current valid token or nothing if there is no active one;\n+ `/help` to see help message and credentials.\n\n## Usage\n\nTelePyth command is available as an IPython magic command which could be used\nin Jupyter notebook as well as in plain IPython, qtconsole etc. TelePyth\npackage could be also used directly in Python. And also, there is an HTTP API\nthrough which all the things works.\n\n```shell\npip install --extra-index-url https://mirror.daskol.xyz/pypi/ telepyth\n```\n\n#### IPython Magics\n\nIt is easy to send messages after token is issued. Just install `telepyth`\npackage by `pip install telepyth`, import it and notify\n\n```python\nimport telepyth\n\n%telepyth -t 123456789\n%telepyth 'Very magic, wow!'\n```\n\n\n#### HuggingFace Intergration\n\nTelePyth also provides a [trainer callback][1] for HuggingFace's\n`transformers`. There are several usage scenario. The first one is via setting\nreporting method in `TrainingArguments`.\n\n```python\nimport telepyth.interaction\nimport transformers\n\nargs = TrainingArguments(output_dir, report_to=['telepyth'])\n```\n\nFor more fine-grained control on how and when callback should report metrics,\none can set up callback directly in a list of callbacks.\n\n```python\ncallback = TelePythCallback(label='finetune', policy='last')\ntrainer = Trainer(callbacks=[callback])\ntrainer.train()\n```\n\n[1]: https://huggingface.co/docs/transformers/main/en/main_classes/callback\n\n#### TelePyth Client\n\nTelepythClient allows to send notifications, figures and markdown messages\ndirectly without using magics.\n\n```python\nfrom telepyth import TelepythClient\n\ntp = TelepythClient()\ntp.send_text('Hello, World!')  # notify with plain text\ntp.send_text('_bold text_ and then *italic*')  # or with markdown formatted text\ntp.send_figure(some_pyplot_figure, 'Awesome caption here!')  # or even with figure\n```\n\n#### CLI\n\nTelePyth package also provide command line interface (CLI). It is similar to\nIPython magic. For example, one can send notifcation as following.\n\n```shell\ntelepyth -t 31415926 \"Moar notifications!\"\n```\n\n#### HTTP API\n\nNote that you can use TelePyth to send notifications via Telegram without any\nwrappers and bindings.  This is useful for bash scripting.  Just request\nTelePyth backend directly to notify user.  For instance, to send message from\nbash:\n\n```shell\ncurl https://daskol.xyz/api/notify/\u003caccess_token_here\u003e \\\n    -X POST \\\n    -H 'Content-Type: plain/text' \\\n    -d 'Hello, World!'\n```\nSee more examples and usage details [here](examples/).\n\n## Credentials\n\n\u0026copy; [Daniel Bershatsky](https://github.com/daskol) \u003c[daniel.bershatsky@skolkovotech.ru](mailto:daniel.berhatsky@skolkovotech.ru)\u003e, 2017-2022\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaskol%2Ftelepyth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaskol%2Ftelepyth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaskol%2Ftelepyth/lists"}