# darwin-notifications
A tiny, dependency‑light macOS Notification Center helper that posts banners from Python without PyObjC, using ctypes +
the Objective‑C runtime. Ships a simple CLI implemented with Typer and a small Python API you can call from your
scripts.
> ⚠️ Apple deprecated NSUserNotification in favor of UserNotifications.framework. For quick, fire‑and‑forget banners
> from non‑sandboxed tools, NSUserNotification still works on current macOS releases. This package sticks to ctypes on
> purpose—no extra bridge layers.
>
## Features
- Pure ctypes: no `PyObjC` required
- One‑liner CLI to send a notification banner
- Minimal Python API for programmatic use
- Works from Terminal/iTerm (GUI session)
- Optional default sound toggle
## Install
With pip:
```shell
python3 -m pip install darwin_notifications
```
With uv:
```shell
uv pip install darwin_notifications
```
## Quick Start
### CLI
```shell
# Basic
notify --title "Build finished"
# With subtitle and body
notify -t "Hello" -s "From darwin_notifications" -m "Deployed successfully" --sound
```
Run `--help` for all options:
```shell
notify --help
```
### Python API
```python
from darwin_notifications.api import notify
notify(
title="Hello from Python",
subtitle="Optional subtitle",
text="Optional informative text",
sound=True,
)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "darwin-notifications",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "doronz88 <doron88@gmail.com>",
"keywords": "macos, darwin, notify, notifications",
"author": null,
"author_email": "doronz88 <doron88@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/38/c9/260eaf02a1c896c744648caac89e66381f36c6ef2eca47afe15d6cd4d7de/darwin_notifications-0.0.2.tar.gz",
"platform": null,
"description": "# darwin-notifications\n\nA tiny, dependency\u2011light macOS Notification Center helper that posts banners from Python without PyObjC, using ctypes +\nthe Objective\u2011C runtime. Ships a simple CLI implemented with Typer and a small Python API you can call from your\nscripts.\n\n> \u26a0\ufe0f Apple deprecated NSUserNotification in favor of UserNotifications.framework. For quick, fire\u2011and\u2011forget banners\n> from non\u2011sandboxed tools, NSUserNotification still works on current macOS releases. This package sticks to ctypes on\n> purpose\u2014no extra bridge layers.\n> \n\n## Features\n\n- Pure ctypes: no `PyObjC` required\n- One\u2011liner CLI to send a notification banner\n- Minimal Python API for programmatic use\n- Works from Terminal/iTerm (GUI session)\n- Optional default sound toggle\n\n## Install\n\nWith pip:\n\n```shell\npython3 -m pip install darwin_notifications\n```\n\nWith uv:\n\n```shell\nuv pip install darwin_notifications\n```\n\n## Quick Start\n\n### CLI\n\n```shell\n# Basic\nnotify --title \"Build finished\"\n\n# With subtitle and body\nnotify -t \"Hello\" -s \"From darwin_notifications\" -m \"Deployed successfully\" --sound\n```\n\nRun `--help` for all options:\n\n```shell\nnotify --help\n```\n\n### Python API\n\n```python\nfrom darwin_notifications.api import notify\n\nnotify(\n title=\"Hello from Python\",\n subtitle=\"Optional subtitle\",\n text=\"Optional informative text\",\n sound=True,\n)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Post darwin-based notifications using NSUserNotification API",
"version": "0.0.2",
"project_urls": {
"Bug Reports": "https://github.com/doronz88/darwin_notifications/issues",
"Homepage": "https://github.com/doronz88/darwin_notifications"
},
"split_keywords": [
"macos",
" darwin",
" notify",
" notifications"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1eb8997adfa9f0ca7be0cffaf076d13aa9ec2b670a5f0b1f3f1c0338e91dc6d5",
"md5": "99c47c5bc0f8ab99fb515937911d35d3",
"sha256": "002cc3bed1b24fd358febd778cdd8eb0b1512b3ed6cb977ba71de04c6a646661"
},
"downloads": -1,
"filename": "darwin_notifications-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "99c47c5bc0f8ab99fb515937911d35d3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 4595,
"upload_time": "2025-08-25T21:28:58",
"upload_time_iso_8601": "2025-08-25T21:28:58.702993Z",
"url": "https://files.pythonhosted.org/packages/1e/b8/997adfa9f0ca7be0cffaf076d13aa9ec2b670a5f0b1f3f1c0338e91dc6d5/darwin_notifications-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "38c9260eaf02a1c896c744648caac89e66381f36c6ef2eca47afe15d6cd4d7de",
"md5": "4ecd4c76cdc06eb433251cb1cdb8c6b7",
"sha256": "d3ec0e30bcaa6f8e395841a806164d13098ac282d020859dfe68c048679dbf76"
},
"downloads": -1,
"filename": "darwin_notifications-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "4ecd4c76cdc06eb433251cb1cdb8c6b7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6871,
"upload_time": "2025-08-25T21:28:59",
"upload_time_iso_8601": "2025-08-25T21:28:59.757911Z",
"url": "https://files.pythonhosted.org/packages/38/c9/260eaf02a1c896c744648caac89e66381f36c6ef2eca47afe15d6cd4d7de/darwin_notifications-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-25 21:28:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "doronz88",
"github_project": "darwin_notifications",
"github_not_found": true,
"lcname": "darwin-notifications"
}