Receive and manage webhooks of several services at the same time
Project description
Receive and manage webhooks of several services at the same time
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.
Source Distribution
Flask-Hooker-1.0.3.tar.gz
(3.5 kB
view details)
File details
Details for the file Flask-Hooker-1.0.3.tar.gz.
File metadata
- Download URL: Flask-Hooker-1.0.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd3b649075c4c806ef84fc94588befc22b509901942bc7bd590a2ff3d5d09ec5
|
|
| MD5 |
bcc9f7499cbe7b8e82b070e2875b8615
|
|
| BLAKE2b-256 |
8dab07bda9d098a92267994acc60bac50b1f53ef33b6cfaf14a72a22126fe708
|