Skip to content

Basic python function for sending toast notifications on Windows, macOS, and Linux

Notifications You must be signed in to change notification settings

washedgram/notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

notify

Basic Python script for sending toast notifications on Windows, macOS, or Linux. If you're like me, you'd rather see a nice little disappearing notification on your computer screen to update you on a script's progress instead of watching the console all the time, so I made this to cover all my bases (since I alternate regularly between working on my PC, MacBook, and lab servers).

For Linux to work you need to make a Slack webhook to receive notifications. You can find more information on how to do that here.

Installation and usage

  1. Install Python / Pip
  2. Install the rest of the python packages if you don't already have them
  3. Paste webhook in line 3 if necessary

To use in another program, import the function:

from notify import notify

The function takes title (top row) and body (bottom row) arguments respectively.

notify('Hello world', 'this will be a notification!') 

The script file in this repo has an example function call (commented out) when ran in isolation.

This repository is populated with an __init__.py file already, so calling this function in other directories should work out of the box. If you're having trouble importing the folder with this script, you can insert the path at the beginning of your file (after importing everything else) and then import the function.

import sys
sys.path.insert(0, 'path/to/cloned/repo/folder/notify/')
from notify import notify

Questions?

Figure it out.

About

Basic python function for sending toast notifications on Windows, macOS, and Linux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages