<div align="center">
<br>
<h1> notify.py </h1>
<i> Cross platform desktop notifications for Python scripts and applications.</i>
<br>
<br>
<p align="center">
<img src="https://github.com/ms7m/notify-py/workflows/Test%20Linux/badge.svg">
<img src="https://github.com/ms7m/notify-py/workflows/Test%20macOS/badge.svg">
<img src="https://github.com/ms7m/notify-py/workflows/Test%20Windows/badge.svg">
</p>
<br>
<p align="center">
<img src="https://img.shields.io/badge/Available-on%20PyPi-blue?logoColor=white&logo=Python">
<img src="https://img.shields.io/badge/Python-3.6%2B-blue?logo=python">
<img src="https://img.shields.io/badge/Formatting-Black-black.svg">
</p>
<p align="center">
<img src="./docs/site/img/demopics.png">
<h1>
</p>
</div>
## Docs
You can read the docs on this Git's Wiki, or [here](https://ms7m.github.io/notify-py/)
## Supported Platforms.
- Windows 10/11
- macOS 10 >=10.10
- Linux (libnotify)
No dependencies are required other than loguru & jeepney (Only for linux/DBUS).
---
## Install
```
pip install notify-py
```
---
## Usage
**Send Simple Notification**
```python
from notifypy import Notify
notification = Notify()
notification.title = "Cool Title"
notification.message = "Even cooler message."
notification.send()
```
**Send Notification With Icon**
```python
from notifypy import Notify
notification = Notify()
notification.title = "Cool Title"
notification.message = "Even cooler message."
notification.icon = "path/to/icon.png"
notification.send()
```
**Send Notification With Sound**
```python
from notifypy import Notify
notification = Notify()
notification.title = "Cool Title"
notification.message = "Even cooler message."
notification.audio = "path/to/audio/file.wav"
notification.send()
```
**Sending Notifications without blocking**
```python
from notifypy import Notify
notification = Notify()
notification.send(block=False)
```
**Sending with Default Notification Titles/Messages/Icons**
```python
from notifypy import Notify
notification = Notify(
default_notification_title="Function Message",
default_application_name="Great Application",
default_notification_icon="path/to/icon.png",
default_notification_audio="path/to/sound.wav"
)
def your_function():
# stuff happening here.
notification.message = "Function Result"
notification.send()
```
---
# CLI
A CLI is available when you install notify-py
```bash
notifypy --title --message --applicationName --iconPath --soundPath
```
You may need to add ``python3 -m`` to the beginning.
---
## Important Caveats
- As it stands (May 18, 2020), this is simply a notification service. There is _no_ support for embedding custom actions (buttons, dialogs) regardless of platform. Other then telling you if the shell command was sent, there is also no confirmation on user action on the notification.
- macOS does **not** support custom icons on the fly.. You will need to bundle a customized version of the notifier embedded with your custom icon.
---
### Windows Specific.
- No support for balloon tips (pre Win10).. This will be changed in the future.
---
### Contributors
- [Leterax](https://github.com/Leterax)
- [jnoortheen](https://github.com/jnoortheen)
- [dynobo](https://github.com/dynobo)
- [Xou](https://github.com/GiorgosXou)
---
### Inspiration and Special Thanks
- https://github.com/go-toast/toast - Ported their Windows 10 toast notification to Python.
- [Vítor Galvão](https://github.com/vitorgalvao) for https://github.com/vitorgalvao/notificator
- https://notificationsounds.com/notification-sounds/done-for-you-612 example_notification_sound.wav
- https://github.com/mikaelbr/node-notifier
---
# Contributing
Contributions are welcome!
Please base your changes on the latest development branch and open a PR to that branch. PR will not be accepted to the master branch. Tests are ran against all platforms.
### Setting Up Environment
- Install [Poetry](https://python-poetry.org/)
- `poetry install`
- Add patches/new features/bug fiexes
- Run tests
- `poetry run pytest tests/*`
- Run lints
- `poetry run pylint --errors-only notifypy/`
- Run Black Formatting
- `poetry run black notifypy`
- Open PR to `dev` branch.
- Add your name to contributors list if you wish!
Raw data
{
"_id": null,
"home_page": "https://github.com/ms7m/notify-py",
"name": "notify-py",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Mustafa Mohamed",
"author_email": "mustafa@ms7m.me",
"download_url": "https://files.pythonhosted.org/packages/1a/d8/846ca34515305454d7d86c98ed0058eb8ef02175179e7a433b29d791066d/notify_py-0.3.42.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n<br>\n <h1> notify.py </h1>\n <i> Cross platform desktop notifications for Python scripts and applications.</i>\n <br>\n <br>\n <p align=\"center\">\n <img src=\"https://github.com/ms7m/notify-py/workflows/Test%20Linux/badge.svg\">\n <img src=\"https://github.com/ms7m/notify-py/workflows/Test%20macOS/badge.svg\">\n <img src=\"https://github.com/ms7m/notify-py/workflows/Test%20Windows/badge.svg\">\n </p>\n <br>\n <p align=\"center\">\n <img src=\"https://img.shields.io/badge/Available-on%20PyPi-blue?logoColor=white&logo=Python\">\n <img src=\"https://img.shields.io/badge/Python-3.6%2B-blue?logo=python\">\n <img src=\"https://img.shields.io/badge/Formatting-Black-black.svg\">\n </p>\n <p align=\"center\">\n <img src=\"./docs/site/img/demopics.png\">\n <h1>\n </p>\n</div>\n\n## Docs\n\nYou can read the docs on this Git's Wiki, or [here](https://ms7m.github.io/notify-py/)\n\n## Supported Platforms.\n\n- Windows 10/11\n- macOS 10 >=10.10\n- Linux (libnotify)\n\nNo dependencies are required other than loguru & jeepney (Only for linux/DBUS).\n\n---\n\n## Install\n\n```\npip install notify-py\n```\n\n---\n\n## Usage\n\n**Send Simple Notification**\n\n```python\n\nfrom notifypy import Notify\n\nnotification = Notify()\nnotification.title = \"Cool Title\"\nnotification.message = \"Even cooler message.\"\nnotification.send()\n```\n\n**Send Notification With Icon**\n\n```python\n\nfrom notifypy import Notify\n\nnotification = Notify()\nnotification.title = \"Cool Title\"\nnotification.message = \"Even cooler message.\"\nnotification.icon = \"path/to/icon.png\"\n\nnotification.send()\n```\n\n**Send Notification With Sound**\n\n```python\n\nfrom notifypy import Notify\n\nnotification = Notify()\nnotification.title = \"Cool Title\"\nnotification.message = \"Even cooler message.\"\nnotification.audio = \"path/to/audio/file.wav\"\n\nnotification.send()\n\n```\n\n**Sending Notifications without blocking**\n\n```python\n\nfrom notifypy import Notify\n\nnotification = Notify()\nnotification.send(block=False)\n\n```\n\n**Sending with Default Notification Titles/Messages/Icons**\n\n```python\n\nfrom notifypy import Notify\n\nnotification = Notify(\n default_notification_title=\"Function Message\",\n default_application_name=\"Great Application\",\n default_notification_icon=\"path/to/icon.png\",\n default_notification_audio=\"path/to/sound.wav\"\n)\n\ndef your_function():\n # stuff happening here.\n notification.message = \"Function Result\"\n notification.send()\n```\n\n---\n\n# CLI\nA CLI is available when you install notify-py\n\n```bash\nnotifypy --title --message --applicationName --iconPath --soundPath\n```\nYou may need to add ``python3 -m`` to the beginning.\n\n---\n\n## Important Caveats\n\n- As it stands (May 18, 2020), this is simply a notification service. There is _no_ support for embedding custom actions (buttons, dialogs) regardless of platform. Other then telling you if the shell command was sent, there is also no confirmation on user action on the notification.\n\n- macOS does **not** support custom icons on the fly.. You will need to bundle a customized version of the notifier embedded with your custom icon.\n\n---\n\n### Windows Specific.\n\n- No support for balloon tips (pre Win10).. This will be changed in the future.\n\n---\n\n### Contributors\n\n- [Leterax](https://github.com/Leterax)\n- [jnoortheen](https://github.com/jnoortheen)\n- [dynobo](https://github.com/dynobo)\n- [Xou](https://github.com/GiorgosXou)\n\n\n---\n\n### Inspiration and Special Thanks\n\n- https://github.com/go-toast/toast - Ported their Windows 10 toast notification to Python.\n\n- [V\u00edtor Galv\u00e3o](https://github.com/vitorgalvao) for https://github.com/vitorgalvao/notificator\n\n- https://notificationsounds.com/notification-sounds/done-for-you-612 example_notification_sound.wav\n\n- https://github.com/mikaelbr/node-notifier\n\n---\n\n# Contributing\n\nContributions are welcome!\n\nPlease base your changes on the latest development branch and open a PR to that branch. PR will not be accepted to the master branch. Tests are ran against all platforms.\n\n### Setting Up Environment\n\n- Install [Poetry](https://python-poetry.org/)\n - `poetry install`\n- Add patches/new features/bug fiexes\n- Run tests\n - `poetry run pytest tests/*`\n- Run lints\n - `poetry run pylint --errors-only notifypy/`\n- Run Black Formatting\n - `poetry run black notifypy`\n- Open PR to `dev` branch.\n- Add your name to contributors list if you wish!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Cross-platform desktop notification library for Python",
"version": "0.3.42",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a99428ae2d1029c56d3be986c91d313fbac3881e63d56007b41d3dbb5728dfda",
"md5": "7c813013d0f212340e78d888d8700460",
"sha256": "184e1ddb81edfd5e3830784f31203e88f0cb9018f2d9d7aa04f5f540876c0f27"
},
"downloads": -1,
"filename": "notify_py-0.3.42-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c813013d0f212340e78d888d8700460",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4.0",
"size": 649788,
"upload_time": "2023-01-26T10:05:22",
"upload_time_iso_8601": "2023-01-26T10:05:22.800982Z",
"url": "https://files.pythonhosted.org/packages/a9/94/28ae2d1029c56d3be986c91d313fbac3881e63d56007b41d3dbb5728dfda/notify_py-0.3.42-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1ad8846ca34515305454d7d86c98ed0058eb8ef02175179e7a433b29d791066d",
"md5": "37df5b53f763a666359aa04520aa9b51",
"sha256": "f49457f1d0577a150df5c3fd58ed2892ce3106a517f8e2083f61743d1c05be36"
},
"downloads": -1,
"filename": "notify_py-0.3.42.tar.gz",
"has_sig": false,
"md5_digest": "37df5b53f763a666359aa04520aa9b51",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4.0",
"size": 648802,
"upload_time": "2023-01-26T10:05:24",
"upload_time_iso_8601": "2023-01-26T10:05:24.307587Z",
"url": "https://files.pythonhosted.org/packages/1a/d8/846ca34515305454d7d86c98ed0058eb8ef02175179e7a433b29d791066d/notify_py-0.3.42.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-26 10:05:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "ms7m",
"github_project": "notify-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "notify-py"
}