Skip to main content

Notify Mi simplifies sending yourself text and email notifcations from your personal projects by utilizing your gmail account.

Project description

Notify Mi

🔔 Notify Mi simplifies sending yourself text and email notifications from your personal projects by utilizing your gmail account. It is a convenient and cost-effective solution with the goal of providing you an easy and free way to send messages in response to events.

Notify Mi is particularly useful when working with IoT devices. It can allow you to receive messages in response to events such as when a sensor value reaches a certain threshold, when a sensor detects something, when a sensor encounters an error, or when a daily or custom timed event occurs. This makes it easy to keep track of what is happening with your IoT device and react to any change or issue that may arise.

With Notify Mi, you can also attach a file with your text or email message. The maximum file size allowed is 1 MB and you can use any of the 69 supported file types, thus providing you flexibility in the type of attachment you want to include in your messages.

Table of Contents

Purpose:

Sending notifications through your Gmail account is not a novel idea. Notify Mi is designed to be a modular and reliable way to send notifications without having to spend time and effort figuring out how to do it each time you want to add this feature to your project. Plus, the implementation process should be straightforward and take only a couple minutes. This way, you can focus on other aspects of your project and save time.

Getting Started:

  1. Generate an app password for your gmail account by clicking here.

    • place your gmail address and app password in a tuple like so → ("gmail_address", "app_password")
    • (optional) step by step guide on how to generate an app password
  2. Install Notify Mi

# 2. install notify_mi using pip
pip install notify_mi

# ✔️ That's it, now you are ready to use

Usage:

Import
from notify_mi import notify
Text messsage Only
# send only a text message
# include phone_number and phone_provider (see providers list below)
# phone number: "(619) 123-4567", "619-123-4567", or "6191234567" (all acceptable)
notify.send_message("Hello World!", 
       ("gmail", "password"), 
       phone_number = "your_number", 
       phone_provider= "your_phone_provider")
Text + Email
# send text message + email
# include phone_number, phone_provider (see providers list below), and receiver email
# phone number: "(619) 123-4567", "619-123-4567", or "6191234567" (all acceptable)
notify.send_message("Hello World!", 
       ("gmail", "password"), 
       phone_number = "your_number", 
       phone_provider= "your_phone_provider", 
       send_to = "email@gmail.com")
Email Only
# send only email
# include receiver email
notify.send_message("Hello World!", 
       ("gmail", "password"), 
       send_to = "email@gmail.com")
Other Parameters
# add a subject line to the message
notify.send_message(subject = "EMERGENCY", 
       message = "No sweets detected in fridge!")

# add a file attachment (69 file types supported)
notify.send_message(subject = "I found it", 
       message = "My dream car", 
       file_attachment = "/path/car.png")

# run without blocking main thread
notify.send_message("Hello World!", 
       threaded = True)
       
# you can re-order any of the parameters
notify.send_message(threaded = True,
       file_attachment = "/path/to/file"
       phone_number = "your_number", 
       phone_provider = "your_phone_provider", 
       send_to = "email@gmail.com",
       sender_credentials = ("gmail", "password"), 
       message = "No sweets detected in fridge!")
List of Phone Providers
# Select From: 
"AT&T", "Boost Mobile", "C-Spire", "Cricket Wireless", 
"Consumer Cellular", "Google Project Fi", "Metro PCS", 
"Mint Mobile", "Page Plus", "Republic Wireless", "Sprint",
"Straight Talk", "T-Mobile", "Ting", "Tracfone", 
"U.S. Cellular", "Verizon", "Virgin Mobile", and "Xfinity Mobile"

Special Thanks:

Alfredo Sequeida for writing a detailed article and for making a great video that went step by step on how to send text messages using python. It was very useful for one of my projects so I am adding to what he did so that other people can find it useful.

Alfredo also made a package named etext so check that out!

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

notify_mi-1.0.3.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notify_mi-1.0.3-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file notify_mi-1.0.3.tar.gz.

File metadata

  • Download URL: notify_mi-1.0.3.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for notify_mi-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f9dbb7ff2df64c8890673bb22bf380998d4fc1fd9c35b790a073111dfa49507d
MD5 113fdd895a4cfc3dc454c9c97135d5bf
BLAKE2b-256 2d24c1c168c379423adf246c11a34e5f16c7b66e1c659dafbd8ddcc98ff784aa

See more details on using hashes here.

File details

Details for the file notify_mi-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: notify_mi-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for notify_mi-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c10b64ce18c8b585b836a75e2e587df2a0f7719626582b7e3c4b397804ab5606
MD5 987ef43db58c1f97ccafe598daa96168
BLAKE2b-256 ee45c3a9d6b363d763737754692fbe54ad51bbe0612bee8f7668da6b5faf8478

See more details on using hashes here.

Supported by

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