Skip to main content

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.

The full documentation is available here.

Using notification decorators

from yell import notify
from yell.decorators import notification

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

@notification(name = 'buffalo')
def buffalo_saver(message):
    save(message)

notify("buffalo", _("Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo"))

Using notification classes

from yell import Notification, notify

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

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

class BuffaloEmail(Buffalo):
    def notify(self, *args, **kwargs):
        send_mail("Buffalo", self.message, 'buffalo@example.com', [kwargs.get('user').email])

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

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

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

Changelog

v0.3

  • backwards incompatible Guessing the file extension with the mimetypes package proved to be inconsistent across systems. TemplatedEmailBackend now makes use of explicitly declared file extensions.

v0.2

  • Made the API saner to use (backwards incompatible):

    • yell.Yell became yell.Notification

    • yell.yell became yell.notify

    • yell.decorators.yelling became yell.decorators.notification

Metadata

Release files for yell 0.3

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

Source distribution (sdist)

Source distribution for yell 0.3
File Size Uploaded Provenance
yell-0.3.tar.gz 5.8 kB Without provenance Details

Release files / yell-0.3.tar.gz

Download URL yell-0.3.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7fb838d5e1442fb76c172c735bca62a434cf7b9e762871b1f4e45b9b20120fe1
BLAKE2b-256 checksum
How to use checksums
b7c029a7a1c36a825a9e1ea7c8450d4c526fe26e4302445cc5ed51664074849a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for yell 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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