Metadata-Version: 2.5
Name: boilpayment-notify
Version: 0.1.0
Summary: boilpayment — notify
Project-URL: Homepage, https://github.com/schift-io/boilpayment#readme
Project-URL: Repository, https://github.com/schift-io/boilpayment.git
Project-URL: Issues, https://github.com/schift-io/boilpayment/issues
Author: boilpayment contributors
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: boilpayment-core<0.2,>=0.1.0
Requires-Dist: httpx>=0.27
Description-Content-Type: text/markdown

# boilpayment-notify

`Notifier` implementations (an object with an async `send(notification)`) for dunning/expiry/case
emails and alerts: SMTP, Slack incoming webhooks, and Resend, plus `composite` to fan out to
several at once and `with_outbox` to buffer sends for at-least-once delivery.

## Install

```
pip install boilpayment-notify
```

## Usage

```python
from boilpayment_notify import smtp, composite, slack
from boilpayment_core import Notification

notifier = composite([
    smtp(host="smtp.example.com", port=587, user=user, password=pw, from_="billing@acme.com", to="ops@acme.com"),
    slack(webhook_url=os.environ["SLACK_WEBHOOK_URL"]),
])

# Passed into lifecycle.dunning.* / credits.notify_expiring as the `notifier` dependency:
await notifier.send(Notification(type="dunning.grace_started", customer_id="cust_1", payload={}))
```

Full module contract: [docs/ARCHITECTURE.md §3.5](https://github.com/schift-io/boilpayment/blob/main/docs/ARCHITECTURE.md).
