Skip to main content

Tool to send notifications

Project description

ppnotify

Tool to send notifications

PyPI package: ppnotify

Feel free to open a GitHub issue if you spot a problem or have an improvement idea. I will be happy to look into it for you.

Installation

The package is available in PyPI and can be installed using pip:

$ pip install --user ppnotify
$ ppnotify --help

Once installed, a command line tool ppnotify will be available in your system's PATH.

Configuration

By default, the tool reads its configuration from ~/.config/ppnotify file (the location can be overridden by setting environment variable XDG_CONFIG_HOME).

The config file should look like this:

[default]
slack_key = xxx
email_domain = example.com

[teams]
channel1 = https://url1.example.com
channel2 = https://url2.example.com

Usage - Help

$ ppnotify --help
usage: ppnotify [--version] [--help] [--debug] [--verbose] [-m {slack,teams}] [-f SENDER] -t RECIPIENTS [RECIPIENTS ...] [-s SUBJECT] [-H]

Tool to send notifications

options:
  --version             show program's version number and exit
  --help                show this help message and exit
  --debug               debugging mode
  --verbose             verbose debugging mode
  -m, --method {slack,teams}
                        notification method (default: teams)
  -f, --from SENDER     sender
  -t, --to RECIPIENTS [RECIPIENTS ...]
                        recipient
  -s, --subject SUBJECT
                        subject
  -H, --code            send code block

Usage - CLI

$ echo 'The king is dead, long live the king!' \
  | ppnotify -Hf 'Jon Snow' \
  -t 'game-of-thrones-channel' \
  -s 'Re: secret message'

Usage - Python module

from ppnotify import Slack

slack = Slack()

status = slack.send(
    sender='Jon Snow',
    recipients=['game-of-thrones-channel'],
    subject='Re: secret message',
    message='The king is dead, long live the king!',
    code=True
)

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

ppnotify-0.0.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

ppnotify-0.0.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file ppnotify-0.0.3.tar.gz.

File metadata

  • Download URL: ppnotify-0.0.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ppnotify-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ac2ce49bc343a0110e08fa503d6812eb2f9a7f4ba2a6a4d64aef861e517d0950
MD5 ff3d006a778bf7d930935db2a1c96a62
BLAKE2b-256 a9c6cd7380975b4faf86da83ad0517911e1b5c953c766c4dfe99eef2afc912cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppnotify-0.0.3.tar.gz:

Publisher: main.yml on peterpakos/ppnotify

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

File details

Details for the file ppnotify-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ppnotify-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ppnotify-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b514dd1f850e8deae70d6b7813ae695a42a1c8776630c0b7b373e412a0979498
MD5 1038d6c0528cbb3d25606d741e26d4ea
BLAKE2b-256 e564c05d29ff659e568a841ac9f7e3dc1982fb9694438a5602ab94de6da4336d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppnotify-0.0.3-py3-none-any.whl:

Publisher: main.yml on peterpakos/ppnotify

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