Skip to main content

Full logo

Tests PyPi version Supported Python versions License Status Docker image RTD Paypal PyPI Downloads pre-commit X (formerly Twitter) Follow

See changelog for recent changes

Got an app or service, and you want to enable your users to use notifications with their provider of choice? Working on a script and you want to receive notification based on its output? You don't need to implement a solution yourself, or use individual provider libs. A one stop shop for all notification providers with a unified and simple interface.

Supported providers

Pushover, SimplePush, Slack, Gmail, Email (SMTP), Telegram, Pushbullet, Join, Zulip, Twilio, Pagerduty, Mailgun, StatusPage.io, iCloud, VictorOps (Splunk), Notify

Advantages

  • Spend your precious time on your own code base, instead of chasing down 3rd party provider APIs. That's what we're here for!
  • With a minimal set of well known and stable dependencies (requests, pydantic and click) you're better off than installing 3rd party SDKs.
  • A unified interface means that you already support any new providers that will be added, no more work needed!
  • Thorough testing means protection against any breaking API changes. We make sure your code your notifications will always get delivered!

Installation

Requires Python 3.10 or newer.

As a library, add it to your project with uv:

$ uv add notifiers

To use the CLI, run it with uvx without installing anything:

$ uvx notifiers --help

Or install the notifiers command once:

$ uv tool install notifiers

Via pip:

$ pip install notifiers

Via homebrew:

$ brew install notifiers

Or run the CLI with Docker:

$ docker run --rm ghcr.io/liiight/notifiers pushover notify --user foo --token baz "This is so easy!"

Basic Usage

>>> from notifiers import get_notifier
>>> p = get_notifier('pushover')
>>> p.required
{'required': ['user', 'message', 'token']}
>>> p.notify(user='foo', token='bar', message='test')
<Response,provider=Pushover,status=Success, errors=None>

Or:

>>> from notifiers import notify
>>> notify('pushover', user='foo', token='bar', message='test')
<Response,provider=Pushover,status=Success, errors=None>

From CLI

$ uvx notifiers pushover notify --user foo --token baz "This is so easy!"

Or, after uv tool install notifiers:

$ notifiers pushover notify --user foo --token baz "This is so easy!"

As a logger

Directly add to your existing stdlib logging:

>>> import logging
>>> from notifiers.logging import NotificationHandler

>>> log = logging.getLogger(__name__)

>>> defaults = {
        'token': 'foo',
        'user': 'bar'
    }
>>> hdlr = NotificationHandler('pushover', defaults=defaults)
>>> hdlr.setLevel(logging.ERROR)

>>> log.addHandler(hdlr)
>>> log.error('And just like that, you get notified about all your errors!')

Mentions

Road map

  • Many more providers!
  • Low level providers (Amazon SNS, Google FCM, OS Toast messages) via extra dependencies

See Docs for more information

Donations

If you like this and want to buy me a cup of coffee, please click the donation button above or click this link ☕

Code of Conduct

Everyone interacting in the Notifiers project's codebases, issue trackers and chat rooms is expected to follow the PyPA Code of Conduct.

Metadata

Release files for notifiers 2.0.0

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

Source distribution (sdist)

Source distribution for notifiers 2.0.0
File Size Uploaded
notifiers-2.0.0.tar.gz 35.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for notifiers 2.0.0
File Interpreter ABI Platform
notifiers-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 86.4 kB

Release files / notifiers-2.0.0.tar.gz

Download URL notifiers-2.0.0.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0843dd4ecd092d0c952c011c3b1b16d42f61b51950908a1c2337bef83f4455f3
BLAKE2b-256 checksum
How to use checksums
c057606eea8e432af3bd431929a2e41d1559cf1083284a73e82d7655eda19261
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / notifiers-2.0.0-py3-none-any.whl

Download URL notifiers-2.0.0-py3-none-any.whl
Size 51.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c244209843bafa70420d36d1ca4cc3423e46eb828b1bc98b59d2b5e1c8a65e7a
BLAKE2b-256 checksum
How to use checksums
ecfa40acbb54e6cb2199ff30e1f811d6805fadbf4ff8264ae1b1fd250f4ff5fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

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