How To Create A Drink Water Notification Reminder App in Python



In this post we are going to crate a python application which will remind us to drink water periodically

This application will track time and show you notification after a brief period of time to remind you to drink water. We are going to use plyer module to show the notification and the time module to run the module after a fixed period of time. you can install plyer by typing "pip install plyer" on the terminal or command prompt. 

This code will not work If you copy this code from there because the "Name" "Main" module not work when you copy the code from any where 



import time
from plyer import notification
if __name__ == '__main__':
    while True:
        notification.notify(
            title = "**Please Drink Water Now!!",
            message ="Your Message",
            app_icon = "C:\\Users\\anmol\\OneDrive\\Desktop\\School\\Python Turtle\\beer.ico",
            timeout= 12
            )
        time.sleep(6)
        #time.sleep(60*60)

Post a Comment

Previous Post Next Post