Metadata-Version: 2.1
Name: macos-notifications
Version: 0.1.4
Summary: Simple interactable Mac notifications with only pure-python dependencies
Author-email: Jorrick Sleijster <jorricks3@gmail.com>
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Environment :: MacOS X
Classifier: Environment :: MacOS X :: Aqua
Classifier: Environment :: MacOS X :: Carbon
Classifier: Environment :: MacOS X :: Cocoa
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Typing :: Typed
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: pyobjc-core==8.5
Requires-Dist: pyobjc-framework-Cocoa==8.5
Requires-Dist: pre-commit >=2.19.0,<3.0.0 ; extra == "dev"
Requires-Dist: mkdocs >=1.3.0,<2.0.0 ; extra == "doc"
Requires-Dist: mkdocs-material >=8.3.9,<9.0.0 ; extra == "doc"
Requires-Dist: mkdocstrings[python] >=0.19.0,<1.0.0 ; extra == "doc"
Requires-Dist: termynal >=0.2.0,<1.0.0 ; extra == "doc"
Requires-Dist: flake8 >=4.0.0,<5.0.0 ; extra == "test"
Requires-Dist: black >= 22.6.0,<23.0.0 ; extra == "test"
Requires-Dist: isort >=5.10.1,<6.0.0 ; extra == "test"
Requires-Dist: mypy ==0.910 ; extra == "test"
Project-URL: Documentation, https://jorricks.github.io/macos-notifications
Project-URL: Home, https://github.com/Jorricks/macos-notifications
Project-URL: Issues, https://github.com/Jorricks/macos-notifications/issues
Project-URL: PullRequests, https://github.com/Jorricks/macos-notifications/pulls
Project-URL: Source, https://github.com/Jorricks/macos-notifications
Provides-Extra: dev
Provides-Extra: doc
Provides-Extra: test

<p align="center">
  <a href="https://github.com/Jorricks/macos-notifications"><img src="https://github.com/Jorricks/macos-notifications/raw/main/docs/img/macos-notifications.png" alt="macos-notifications" width="600px"></a>
</p>
<p align="center">
<a href="https://www.apple.com/mac/" target="_blank">
    <img src="https://img.shields.io/badge/Platform-mac-blue" alt="Mac supported">
</a>
<a href="https://pypi.org/project/macos-notifications" target="_blank">
    <img src="https://img.shields.io/pypi/v/macos-notifications?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/macos-notifications" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/macos-notifications.svg?color=%2334D058" alt="Supported Python versions">
</a>
</p>

---

**Documentation**: [https://jorricks.github.io/macos-notifications/](https://jorricks.github.io/macos-notifications/)

**Source Code**: [https://github.com/Jorricks/macos-notifications](https://github.com/Jorricks/macos-notifications)

---

**mac-notification** is a Python library to make it as easy as possible to create interactable notifications.


## Installation

To use macos-notifications, first install it using pip:

    pip install macos-notifications


## Features
- 🚀 Easy python interface. It's as simple as '`client.create_notification(title="Meeting starts now!", subtitle="Team Standup")`'
- 💥 Ability to add action buttons with callbacks!
- 📝 Ability to reply to notifications!
- ⌚ Delayed notifications.
- ⏱️ Automatically time out the notification listener.
- 📦 Just `pyobjc` as a dependency.

## Example
```python
from functools import partial
from mac_notifications import client

client.create_notification(
    title="Meeting starts now!",
    subtitle="Team Standup",
    icon="/Users/jorrick/zoom.png",
    action_button_str="Join zoom meeting",
    action_callback=partial(join_zoom_meeting, conf_number=zoom_conf_number)
)
```
A simple example. Please look [in the docs](https://jorricks.github.io/macos-notifications/) for more examples like this:

<p align="center">
<a href="https://jorricks.github.io/macos-notifications/examples/">
<img src="https://github.com/Jorricks/macos-notifications/raw/main/docs/img/example-run.gif" alt="macos-notifications" width="600px">
</a>
</p>

##  Why did you create this library?
I wanted a library that did not depend on any non-python tools (so you had to go around and install that). Instead, I wanted a library where you install the pip packages, and you are done.
Later I realised how hard it was to integrate correctly with PyOBJC. Also, I had a hard time finding any examples on how to easily integrate this in a non-blocking fashion with my tool. 
Hence, I figured I should set it up to be as user-friendly as possible and share it with the world ;)!


## Limitations
Although there are some limitations, there is no reason to not use it now :v:.
- You need to keep your application running while waiting for the callback to happen.
- Currently, we are only supporting the old deprecated [user notifications](https://developer.apple.com/documentation/foundation/nsusernotification). Soon we will also make the new implementation available.

