Skip to main content

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:

python3 -m pip install darwin_notifications

With uv:

uv pip install darwin_notifications

Quick Start

CLI

# 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:

notify --help

Python API

from darwin_notifications.api import notify

notify(
    title="Hello from Python",
    subtitle="Optional subtitle",
    text="Optional informative text",
    sound=True,
)

Metadata

Release files for darwin-notifications 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for darwin-notifications 0.0.2
File Size Uploaded
darwin_notifications-0.0.2.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for darwin-notifications 0.0.2
File Interpreter ABI Platform
darwin_notifications-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / darwin_notifications-0.0.2.tar.gz

Download URL darwin_notifications-0.0.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d3ec0e30bcaa6f8e395841a806164d13098ac282d020859dfe68c048679dbf76
BLAKE2b-256 checksum
How to use checksums
38c9260eaf02a1c896c744648caac89e66381f36c6ef2eca47afe15d6cd4d7de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / darwin_notifications-0.0.2-py3-none-any.whl

Download URL darwin_notifications-0.0.2-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
002cc3bed1b24fd358febd778cdd8eb0b1512b3ed6cb977ba71de04c6a646661
BLAKE2b-256 checksum
How to use checksums
1eb8997adfa9f0ca7be0cffaf076d13aa9ec2b670a5f0b1f3f1c0338e91dc6d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page