Skip to main content

Parses incoming Sendgrid Webhooks in Pyramid apps

Project description

https://img.shields.io/pypi/v/pyramid_sendgrid_webhooks.svg https://img.shields.io/travis/GoodRx/pyramid-sendgrid-webhooks.svg Documentation Status

Parses incoming Sendgrid Webhooks in Pyramid apps

Features

To use this app, add a configuration statement with your intended webhook callback path:

config.include('pyramid_sendgrid_webhooks', '/sendgrid/webhooks')

Then, set up subscribers for any events that you want to be notified of:

from pyramid_sendgrid_webhooks import events

def handle_bounce(event):
    request = event.request
    print event.reason

...
config.add_subscriber(handle_bounce, events.BounceEvent)

Currently the app adds a single endpoint at {PREFIX}/receive. This will be the webhook path to give to Sendgrid. In the example above, the full endpoint would therefore be at /sendgrid/webhooks/receive.

Credits

Tools used in rendering this package:

History

1.2.2 (2015-12-15)

  • Updating documentation with modules

1.2.1 (2015-12-15)

  • Update trove classifiers

1.2.0 (2015-12-14)

  • Correct package listing in setup.py

1.0.0 (2015-12-07)

  • First release on PyPI.

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

pyramid_sendgrid_webhooks-1.2.3.tar.gz (68.8 kB view hashes)

Uploaded Source

Built Distribution

pyramid_sendgrid_webhooks-1.2.3-py2.py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page