Send Python job alerts via email
Project description
Hermes Mail
Send Python job alerts via email.
from hermes_mail import EmailClient
import os
hermes = EmailClient(sender_email="mlguy@gmail.com", sender_password=os.getenv("GMAIL_PASSWORD"))
hermes.send_email(
receiver_emails=["foo@gmail.com", "bar@gmail.com"],
subject="cuda:0 is free",
body="I finished training my models on cuda:0 so feel free to use it."
)
hermes_mail
works seamlessly within Python code to send emails. It is designed for sending job alerts upon completion of long-running jobs. This currently only works when the sender is a Gmail account.
Installation
pip install hermes-mail
- Navigate to Google Account Security and ensure that 2-Step Verification is enabled.
- Create a Google Account App Password for
hermes_mail
and save it somewhere. This is the password that you will use to initializehermes_mail.Client
.
Now you should be able to send emails using hermes_mail
!
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
hermes_mail-0.1.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for hermes_mail-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f39f21eb9109c504feb7c167aadd88bc3b09e0d6846ccaa29eabd96edc71289 |
|
MD5 | c04afded1df865a0e0ee18e33fc5f59e |
|
BLAKE2b-256 | 9176c4ca358915358ce1cc587d9dc29a298f18b8089beba1d761c3a259cd3d70 |