Skip to main content

Receive and manage webhooks of several services at the same time

Project description

Receive and manage webhooks of several services at the same time

PyPI version Build Status Code Health contributions welcome

Simple usage

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
Flask-Hooker-1.0.3.tar.gz (3.5 kB) Copy SHA256 hash SHA256 Source None Feb 4, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page