Skip to main content

No project description provided

Project description

enotification

Introduction

enotification is a small package based on zmail, used to email you when your function is finished.

Installation

pip install enotification

Requirements

Since enotification is based on zmail, you should meet the requirements of zmail:

Before using it, please ensure:

  • Using python3
  • Open SMTP/POP3 functions in your mail (For @163.com and @gmail.com you need to set your app private password)

Then, all you need to do is just import zmail.

Note, since this package uses f-string, thus it requires Python>=3.6.

QuickStart

enotification is designed as a decorator class

from enotification import ENotification
import time

@ENotification(send_from="your email", password="your email password")
def test_func():
    print("test!")
    time.sleep(10)

if __name__ == "__main__":
    test_func()
    # your email would receive an email like this:
    # subject: This is a notification from enotification!
    # content: 
    # Your function test_func is finished!
    # Start time: 2021-04-23 11:13:54
    # End time: 2021-04-23 11:14:04
    # Time cost: 0:00:10!

Q & A

If the notification email is not sent correctly, please read zmail's Q&A part to see more specific configurations.

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

enotification-0.0.3.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

enotification-0.0.3-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

Supported by

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