How I Made an Automatic B’day Wisher Using Python

A guide on making an automatic birthday wisher using Python.

Incoggeek
Python in Plain English

--

Credit: unsplash.com

Birthday is one of the happiest days in the life of every human being. Everyone hopes that on this day his/her loved ones will uniquely greet him/her. Some give a sudden surprise, some people wish by eye-catching gifts, etc.

But as a Python programmer, an idea strikes to my mind. I thought if a Python program could be created to wish someone automatically where we could customize the birthday message and time as well. It would be great, wouldn't it?

Today, you will learn to wish someone Happy Birthday in Python Code. You just need to add details of that person in a file.

This code is simpler than you think and very surprising. You have to install two packages or modules that are ‘plyer’ and ‘pywhatkit’.

To install you have to type the following commands in the terminal.

pip install plyer

pip install pywhatkit

When you will run the code a notification will be popped up on the desktop screen and a message will be sent to that person on WhatsApp whom you will add into following bdayfile.txt.

Note: A message will be sent at the specified time. Here I wanted to take a screenshot so I had to change the time to 5:38 PM. In your case, you can customize it accordingly.

If you liked my effort pls do like and drop a comment. If you find any mistakes. I request you to make me correct. I would love to hear that. Thank you!

More content at plainenglish.io. Sign up for our free weekly newsletter. Get exclusive access to writing opportunities and advice in our community Discord.

--

--