Metadata-Version: 2.4
Name: darwin-notifications
Version: 0.0.2
Summary: Post darwin-based notifications using NSUserNotification API
Author-email: doronz88 <doron88@gmail.com>
Maintainer-email: doronz88 <doron88@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/doronz88/darwin_notifications
Project-URL: Bug Reports, https://github.com/doronz88/darwin_notifications/issues
Keywords: macos,darwin,notify,notifications
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: typer

# 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,
)
```
