Python implementation of Windows notifications.
Project description
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# zroya
Zroya is python wrapper around win32 API for creating Windows notification.
## Prerequisites
Zroya requires you to install ``pypiwin32``.
```
> pip install pypiwin32
```
## Installation
Zroya is available from pypi:
```
> pip install zroya
```
## Example
```python
# Import NotificationCenter
from zroya import NotificationCenter
quit = False
# This function is called when user clicks on notification
def click_callback(nid, data):
global quit
print("User clicked on your notification!")
quit = True
# Create instance of NotificationCenter
nc = NotificationCenter()
# Create new notification
nc.create("Test Notification", "Longer notification description. \n With multiline support!", on_click = click_callback)
# Update function should be called in your event loop. In this example, we will create our own event loop:
while nc.update():
if quit:
nc.quit()
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zroya-0.1.0.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for zroya-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be8f606a539f5ea9f535f25d5d85fe0f11a65815e296d1aefb33d9c9f0082056 |
|
MD5 | 321991d0f485b73c8a83c12356f2502b |
|
BLAKE2b-256 | d7c7b97cdc37919d1d3e910ae1d99cdd500c6b1003a454af1885d1d47a809c21 |