Skip to main content

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 
# see https://www.getmailbird.com/gmail-app-password/
# 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
notify.send_message("Hello World!", ("gmail", "password"), 
    phone_number = "your_number", phone_provider= "select from list below")
Text + Email
# send text message + email
# include phone_number, phone_provider, and receiver email
notify.send_message("Hello World!", ("gmail", "password"), phone_number = "your_number", phone_provider= "select from list below", send_to = "name@email.com")
Email Only
# send only email
# include receiver email
notify.send_message("Hello World!", send_to = "name@email.com")
Optional Paramters
# 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)
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.

Metadata

Release files for notify-mi 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for notify-mi 1.0.1
File Size Uploaded
notify_mi-1.0.1.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for notify-mi 1.0.1
File Interpreter ABI Platform
notify_mi-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / notify_mi-1.0.1.tar.gz

Download URL notify_mi-1.0.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c21d796e5a521d7473d605f9bcb7e5c07496a80c8f0877fe5a81396ee1ad0901
BLAKE2b-256 checksum
How to use checksums
9f6ba7bde1f7476f6a1979b232f6aeabbcbc6461837b7dba8063bd88f99d4ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / notify_mi-1.0.1-py3-none-any.whl

Download URL notify_mi-1.0.1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b4d3227474be3c149f17e58f05a3c53782b7ce733d46988750be3b6919760d5
BLAKE2b-256 checksum
How to use checksums
fcf9c879c6446f27de8f83417190c410ecdb07b2debf061d590182859238265c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

1.0.3

2 release files

1.0.2

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page