Skip to content

Toaster is a simple python library that sends you a message on Telegram when your code finished running or encountered an error

License

Notifications You must be signed in to change notification settings

GuitaristForEver/toaster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

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

  1. Install via pip
pip install pytoaster

Usage

Step 1. Get your telegram ID from @FreshToasterBot on Telegram

Start Convo

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 by @FreshToasterBot when your code finishes executing.

Sample Response

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

About

Toaster is a simple python library that sends you a message on Telegram when your code finished running or encountered an error

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%