Skip to main content

get mail notifications when your training is completed

Project description

gmail_trainer

Pypi package to send an email to yourself whenever the training of your model has finished.

You can install the package using:

pip install gmail-trainer

The first step is to go to this website to enable the Gmail API: https://developers.google.com/gmail/api/quickstart/python

Once you have enabled the API, a credentials.json file gets downloaded. Put it in your working directory and execute this code:

from gmail_trainer import SendMail
gmail = SendMail()
service = gmail.create_credentials()

A chrome page opens up and asks you to allow the API to access sending mails. Once its done a token.pickle file containing the access codes is created in your working directory. You can even copy that file to other directories to enable gmail-trainer for other projects as well.

Now that you have your pickle file ready and are about to start training a long deep neural network, you can add this code snippet at the end of your training. The message content could contain the performance of your algorithm. As long as its a String.


message = gmail.CreateMessage(address='youremailaddress@gmail.com',
                              msgPlain='Your message containing your algorithm performance as a String. This will be the body of the email.')
result = gmail.send_msg(service, message)

Now you will get an email once the training is done ! Which you can check on your phone. This is ideal if you want to take some time off your laptop screen.

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

gmail_trainer-0.7.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file gmail_trainer-0.7.tar.gz.

File metadata

  • Download URL: gmail_trainer-0.7.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.10

File hashes

Hashes for gmail_trainer-0.7.tar.gz
Algorithm Hash digest
SHA256 8597a0f4144d4c6243e99baba5cedd4d0d76fa4e9d699a76d09dcef7d2e085b7
MD5 58c2d38c06e22dcca62650a39bfa2049
BLAKE2b-256 c638098c88bea790c88787859b496aad19cc329eb03a9b41fd1eb17483b0a496

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page