https://github.com/daskol/telepyth
Telegram notification with IPython magics.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.0%) to scientific vocabulary
Keywords
Repository
Telegram notification with IPython magics.
Basic Info
Statistics
- Stars: 59
- Watchers: 2
- Forks: 3
- Open Issues: 4
- Releases: 1
Topics
Metadata Files
README.md
TelePyth
Telegram notification with IPython magics.
Overview
TelePyth (named /teləˈpaɪθ/) — a Telegram bot that is integrated with IPython. It provides an ability to send any text notification to user from Jupyter notebook or IPython CLI.
Bot Commands
Start chat with @telepyth_bot and get
access token using /start command. TelePyth Bot understands some other
simple commands. Type
/startto begin interaction with bot;/revoketo revoke token issued before;/lastto get current valid token or nothing if there is no active one;/helpto see help message and credentials.
Usage
TelePyth command is available as an IPython magic command which could be used in Jupyter notebook as well as in plain IPython, qtconsole etc. TelePyth package could be also used directly in Python. And also, there is an HTTP API through which all the things works.
shell
pip install --extra-index-url https://mirror.daskol.xyz/pypi/ telepyth
IPython Magics
It is easy to send messages after token is issued. Just install telepyth
package by pip install telepyth, import it and notify
```python import telepyth
%telepyth -t 123456789 %telepyth 'Very magic, wow!' ```
HuggingFace Intergration
TelePyth also provides a trainer callback for HuggingFace's
transformers. There are several usage scenario. The first one is via setting
reporting method in TrainingArguments.
```python import telepyth.interaction import transformers
args = TrainingArguments(outputdir, reportto=['telepyth']) ```
For more fine-grained control on how and when callback should report metrics, one can set up callback directly in a list of callbacks.
python
callback = TelePythCallback(label='finetune', policy='last')
trainer = Trainer(callbacks=[callback])
trainer.train()
TelePyth Client
TelepythClient allows to send notifications, figures and markdown messages directly without using magics.
```python from telepyth import TelepythClient
tp = TelepythClient() tp.sendtext('Hello, World!') # notify with plain text tp.sendtext('bold text and then italic') # or with markdown formatted text tp.sendfigure(somepyplot_figure, 'Awesome caption here!') # or even with figure ```
CLI
TelePyth package also provide command line interface (CLI). It is similar to IPython magic. For example, one can send notifcation as following.
shell
telepyth -t 31415926 "Moar notifications!"
HTTP API
Note that you can use TelePyth to send notifications via Telegram without any wrappers and bindings. This is useful for bash scripting. Just request TelePyth backend directly to notify user. For instance, to send message from bash:
shell
curl https://daskol.xyz/api/notify/<access_token_here> \
-X POST \
-H 'Content-Type: plain/text' \
-d 'Hello, World!'
See more examples and usage details here.
Credentials
© Daniel Bershatsky <daniel.bershatsky@skolkovotech.ru>, 2017-2022
GitHub Events
Total
Last Year
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Daniel Bershatsky | d****y@s****u | 68 |
| maremun | m****n@g****m | 4 |
| Andrew Grigorev | a****w@e****u | 2 |
| Daniel Bershatsky | d****y@g****m | 1 |
| Daniel Bershatsky | d****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 6
- Total pull requests: 4
- Average time to close issues: 22 days
- Average time to close pull requests: 5 days
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.67
- Average comments per pull request: 0.25
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ei-grad (3)
- daskol (3)
Pull Request Authors
- ei-grad (2)
- daskol (1)
- maremun (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 8 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 16
- Total maintainers: 1
proxy.golang.org: github.com/daskol/telepyth
- Homepage: https://github.com/daskol/telepyth
- Documentation: https://pkg.go.dev/github.com/daskol/telepyth#section-documentation
- License: MIT
-
Latest release: v0.2.0
published over 2 years ago
Rankings
pypi.org: telepyth
TelePyth: Telegram notifications in Python.
- Homepage: https://github.com/daskol/telepyth
- Documentation: https://telepyth.readthedocs.io/
- License: MIT
-
Latest release: 0.1.6
published about 8 years ago