Skip to main content

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contriwork_notifications-0.1.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contriwork_notifications-0.1.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

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

Hashes for contriwork_notifications-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c976e22212a7c8f26ba6eb13472d8b6a0508f6c05d4626eb4696ee41ee7c893
MD5 0017ca2b9d68f499935e1980f0022b94
BLAKE2b-256 1d3ed74c290954ace94c7d48c083e0d2ef9c52587960f7ee2b467b8da96dcd39

See more details on using hashes here.

Provenance

The following attestation bundles were made for contriwork_notifications-0.1.0.tar.gz:

Publisher: release-python.yml on contriwork/contriwork-notifications

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file contriwork_notifications-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for contriwork_notifications-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f8dbe9be37a1bd9375ed00f21e6223eb4f6e98b70efb255e76ef3e834dd4209
MD5 30fdfc4a11fff6c7f9cfa75a0fef18c9
BLAKE2b-256 c687d2f41bd9f81f55ba0da3cc06098f44dc8ff976a2d1f5c95a755371e7c229

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page