A decorator for monitoring your task
Project description
py_reminder
This is a Python package that can send email for various purpose.
Introduction
Often times we have some time-consuming task, and we want to leave it run alone without staring at the screen for 7*24 hours.
This package will offer you a simplified experience of sending you email report with customized information.
Installation
pip install -U py_reminder
Initial configuration
You will suggest to use a unimportant mail box to receive message, since the password is going to store in plain text. (or if someone knows how to encrypt, please help!)
For the first time, you should specify configuration
from py_reminder import config
config(address='daveting@example.com',
password='123456',
smtp='smtp.example.com',
port=999,
default_to='daveting@example.com')
You can ignore default_to
. It will set to be the same as address
by default.
If you receive a testing email, then the configuration is done. You can never include this code thereafter.
Sample code
from py_reminder import monitor
@monitor(task='do something', to='receiver@example.com')
def foo()
time.sleep(10)
return 0
foo()
You can ignore to
if you send to your default receiver. So the most simple way to use this decorator is:
@monitor('do something')
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 py_reminder-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2215c6139449b7ee8631072dc9735437f83c3a8a184bf624239916412a2d5d87 |
|
MD5 | 08a68e64baedc1234098fabbaee1fd5f |
|
BLAKE2b-256 | af84a0ebc93c261ebe993093090bc1001bcc90aebb293c5cbb14fd8d61b49121 |