Skip to main content

Programmable, extensible and easy to use notification system

Project description

Programmatically send notifications!

About

Have you ever been in a situation where you’ve been simply twiddling your thumbs, waiting for your program to finish compiling/running? Are you into Deep Learning and need a way to notify yourself when your program crashes or is done learning to do the impossible?

Then Herald is for you!

With a simple, extensible and pythonic interface, you can get setup with a programmatic way of notifying yourself and/or your teammates about different events in your code.

The following platforms are currently supported:

  • GMail

  • Twilio

Need to use it with a custom platform? You can easily write your own notifier and plug it in to handle that, making Herald infinitely extensible.

Installation

The easy pip install herald.

Usage

The primary way to use Herald is like a context manager. E.g.

import herald
from herald import notifiers

# Send yourself a mail in Gmail to notify you
# Assumes your Gmail tokens have been set up properly
notifier = notifiers.GmailNotifier()

with Herald(notifier, message="Model Trained!"):
    # super long running process
    train_model()
    ...

You should get an email in your registered Gmail account at the end of the program.

You can also specify notifications at arbitrary points via the notifier call:

import herald
from herald import notifiers

notifier = notifiers.TerminalNotifier("Whoop de doo!")

notifier.notify("A new custom message")

# Send the original message from the constructor
notifier.notify()

Contributing

If you find bugs, please feel free to submit an Issue, or even better, a Pull Request!

Development

To set up your dev environment, perform the following steps: - Clone Herald - Inside the root directory, run pipenv shell to open a shell. - Finally run pipenv install to install all the dependencies.

At this point, you should be good to go!

Testing

WIP

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

herald-notify-1.0.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

herald_notify-1.0.0-py2.py3-none-any.whl (8.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file herald-notify-1.0.0.tar.gz.

File metadata

  • Download URL: herald-notify-1.0.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for herald-notify-1.0.0.tar.gz
Algorithm Hash digest
SHA256 18d5b77318af73b8a04236b2590507affccdead25a415413d0215c60d6abe572
MD5 241c929092b2cc0f25a0059ca891cfdb
BLAKE2b-256 6e053bfff67faff9a0b0bd74c009354f07596b051fe467cc068b232560748db9

See more details on using hashes here.

File details

Details for the file herald_notify-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for herald_notify-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a4fb7eff164c4c7fa748bcc481d0e08d23dbd8962ab42469fbdf3d7141af215e
MD5 db56a474a546a4ef7798e221c5160bf2
BLAKE2b-256 b60f945d4bda5e6348ee220f2d8deaa344479d1957de321834d8fc5da02d685b

See more details on using hashes here.

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