Skip to main content

Receive and manage webhooks of several services at the same time

Project description

#Flask-Hooker
Receive and manage webhooks of several services at the same time

###Simple usage
```python
from flask import Flask
from flask_hooker import Hooker

def github_issue(json):
print 'new issue at:', json['issue']['url']

def gitlab_push(json):
print 'the user %s push change into %s' % (json['user_name'], json['project']['name'])

app = Flask(__name__)

hooker = Hooker(app=app, url_prefix='/webhook')

# with fabrics
# hooker = Hooker()
# hooker.init_app(app)

hooker.add_handler(event='issues', func=github_issue, event_type='X-Github-Event')
hooker.add_handler('Push Hook', gitlab_push, 'X-Gitlab-Event')

...
```

Project details


Download files

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

Files for Flask-Hooker, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size Flask-Hooker-1.0.1.tar.gz (3.0 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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page