Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/versa-syahptr/winotify
A pure python module to create Windows 10 Notification
https://github.com/versa-syahptr/winotify
notification notifications python python-library python3 windows-10 windows-desktop
Last synced: about 8 hours ago
JSON representation
A pure python module to create Windows 10 Notification
- Host: GitHub
- URL: https://github.com/versa-syahptr/winotify
- Owner: versa-syahptr
- License: mit
- Created: 2021-01-04T03:27:58.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-05T09:18:21.000Z (over 1 year ago)
- Last Synced: 2024-12-26T09:08:00.221Z (8 days ago)
- Topics: notification, notifications, python, python-library, python3, windows-10, windows-desktop
- Language: Python
- Homepage: https://versa-syahptr.github.io/winotify/docs/winotify.html
- Size: 677 KB
- Stars: 81
- Watchers: 4
- Forks: 11
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Winotify
A pure python module to show notification toast on Windows 10.No dependencies, no requirements, all you need is PowerShell installed on your machine
(which in every Windows computer have it).## Installation
Install winotify using pip```sh
pip install winotify
```## Features
* Notification stays in action center
* Clickable notification with 5 additional buttons
* Use function as a callback when clicking the notification## Usage
### A simple notification with icon
```python
from winotify import Notificationtoast = Notification(app_id="windows app",
title="Winotify Test Toast",
msg="New Notification!",
icon=r"c:\path\to\icon.png")toast.show()
```**Result:**
![image1](https://github.com/versa-syahptr/winotify/blob/master/image/winotify%20ss1.png?raw=true)
**The notification stays in the action center!**
![image2](https://github.com/versa-syahptr/winotify/blob/master/image/winotify%20ss2.png?raw=true)
> Note that the icon path must be **absolute** otherwise
the notification will not show### Set sound of the notification
All supported audio are in the ```audio``` module
```python
from winotify import Notification, audiotoast = Notification(...)
toast.set_audio(audio.Mail, loop=False)
```### Add action button
```python
from winotify import Notificationtoast = Notification(...)
toast.add_actions(label="Button text",
launch="https://github.com/versa-syahptr/winotify/")
```
> You can add up to 5 buttons each notification## CLI
```batch
winotify ^
-id myApp ^
-t "A Title" ^
-m "A message" ^
-i "c:\path\to\icon.png" ^
--audio default ^
--open-url "http://google.com" ^
--action "open github" ^
--action_url "http://github.com"
```> Use `winotify-nc` instead of `winotify` to hide the console window.
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.
## Licence
[MIT](https://github.com/versa-syahptr/winotify/blob/master/LICENSE)