Skip to main content

User notification library with pluggable backends. Compatible with popular frameworks such as Django, Flask, Celery.

Project description

Pluggable notifications for your Python apps.

yell is not a notification storage or delivery backend but a set of APIs that make it easy to add your own delivery mechanisms.

Using yelling decorators

from yell.decorators import yelling

@yelling(name = 'buffalo')
def buffalo_printer(message):
    print message

@yelling(name = 'buffalo')
def buffalo_saver(message):

yell("buffalo", _("Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo"))

Using yelling classes

from yell import Yell, yell

class Buffalo(Yell):
    name = "buffalo"
    message = _("Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo")

    def yell(self, *args, **kwargs):
        print self.message

class BuffaloEmail(Buffalo):
    def yell(self, *args, **kwargs):
        send_mail("Buffalo", self.message, '', [kwargs.get('user').email])

class BuffaloDatabase(Buffalo):
    def yell(self, *args, **kwargs):
        BuffaloModel.objects.create(user = kwargs.get('user'))

# The default behaviour is to use every notification backend with the same
# name
yell("buffalo", user = User.objects.get(id=1))

# Only send emails
yell("buffalo", user = User.objects.get(id=1), backends = [BuffaloEmail])

Download files

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

Files for yell, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size yell-0.1.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page