Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 505 Bytes

usage.rst

File metadata and controls

23 lines (15 loc) · 505 Bytes

Usage

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)