Sends a telegram message to you when your code finish running
Project description
Toaster
A simple python library that sends you a message on Telegram when your code finished running or encountered an error.
Table of Contents
Getting Started
To set up Toaster, simply follow the installation and usage example.
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
- Telegram account (Create one if you do not have it)
- Python 3
Installation
- Install via pip
pip install pytoaster
Usage
Step 1. Get your telegram ID from @FreshToasterBot on Telegram
Step 2. Configure toaster using set_id()
.
from toaster import toast, set_id
set_id(<your_telegram_id>)
Note: You'll only have to do this once, it'll then be saved to config.txt
in toaster's installation path.
Step 3. Add @toast
above functions that you want to be notified upon completion.
@toast
def test_func(a,b):
time.sleep(5)
return 'Return {} and {}'.format(str(a),str(b))
Step 4. You'll be notified when your function finishes executing.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Acknowledgements
- Gal Shir for his cute toaster design https://galshir.com/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytoaster-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57a86c404519554c9b64be892f5b809ed389d60b76616e0c55392f1533f4b839 |
|
MD5 | c2311d8371d9ee44d84d3bc81e49e585 |
|
BLAKE2b-256 | d0bb00b8f511de6caaade58800a1bf6d1d8736b520e3c07b374fde9f2799afde |