Multi-channel notification client (Pushover, Telegram, Slack, Discord, SMTP, iMessage on macOS) with retry, rate limit, and quiet-hours support.
Project description
contriwork-notifications (Python)
Python adapter for the ContriWork notifications port. One API surface, three languages (Python / .NET / npm) — this package is the Python implementation.
Cross-language specification, contract, and release history live in the GitHub repository:
- Root README — ecosystem overview
CONTRACT.md— language-agnostic port specCHANGELOG.md
Sister packages: Contriwork.Notifications (NuGet), @contriwork/notifications (npm).
Install
pip install contriwork-notifications
Requires Python ≥ 3.13.
Quick start
import asyncio
from contriwork_notifications import (
NotificationClient, Severity, Payload, SlackWebhookAdapter,
)
client = NotificationClient([SlackWebhookAdapter(webhook_url="https://hooks.slack.com/...")])
result = asyncio.run(
client.send(Severity.WARN, Payload(title="Build failed", body="See CI for details"))
)
print(result.ok, result.attempts)
For the full set of adapters (InMemoryAdapter, PushoverAdapter, TelegramAdapter, SlackWebhookAdapter, DiscordWebhookAdapter, SmtpAdapter) and the configuration knobs (NotificationConfig, RetryConfig, RateLimitPolicy, QuietHoursConfig), see CONTRACT.md.
Local development
uv sync --all-extras
uv run pytest
uv run ruff check
uv run mypy src
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contriwork_notifications-0.1.0.tar.gz.
File metadata
- Download URL: contriwork_notifications-0.1.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c976e22212a7c8f26ba6eb13472d8b6a0508f6c05d4626eb4696ee41ee7c893
|
|
| MD5 |
0017ca2b9d68f499935e1980f0022b94
|
|
| BLAKE2b-256 |
1d3ed74c290954ace94c7d48c083e0d2ef9c52587960f7ee2b467b8da96dcd39
|
Provenance
The following attestation bundles were made for contriwork_notifications-0.1.0.tar.gz:
Publisher:
release-python.yml on contriwork/contriwork-notifications
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contriwork_notifications-0.1.0.tar.gz -
Subject digest:
3c976e22212a7c8f26ba6eb13472d8b6a0508f6c05d4626eb4696ee41ee7c893 - Sigstore transparency entry: 1402270241
- Sigstore integration time:
-
Permalink:
contriwork/contriwork-notifications@e4ed9587c0f9c93c4c5d585f83c0d653b1f177c5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/contriwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@e4ed9587c0f9c93c4c5d585f83c0d653b1f177c5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file contriwork_notifications-0.1.0-py3-none-any.whl.
File metadata
- Download URL: contriwork_notifications-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f8dbe9be37a1bd9375ed00f21e6223eb4f6e98b70efb255e76ef3e834dd4209
|
|
| MD5 |
30fdfc4a11fff6c7f9cfa75a0fef18c9
|
|
| BLAKE2b-256 |
c687d2f41bd9f81f55ba0da3cc06098f44dc8ff976a2d1f5c95a755371e7c229
|
Provenance
The following attestation bundles were made for contriwork_notifications-0.1.0-py3-none-any.whl:
Publisher:
release-python.yml on contriwork/contriwork-notifications
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contriwork_notifications-0.1.0-py3-none-any.whl -
Subject digest:
8f8dbe9be37a1bd9375ed00f21e6223eb4f6e98b70efb255e76ef3e834dd4209 - Sigstore transparency entry: 1402270324
- Sigstore integration time:
-
Permalink:
contriwork/contriwork-notifications@e4ed9587c0f9c93c4c5d585f83c0d653b1f177c5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/contriwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@e4ed9587c0f9c93c4c5d585f83c0d653b1f177c5 -
Trigger Event:
push
-
Statement type: