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
[](https://badge.fury.io/py/Flask-Hooker)
[](https://travis-ci.org/doblel/Flask-Hooker)
[](https://landscape.io/github/doblel/Flask-Hooker/master)
[](https://github.com/doblel/Flask-Hooker/issues)
###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')
...
```
Receive and manage webhooks of several services at the same time
[](https://badge.fury.io/py/Flask-Hooker)
[](https://travis-ci.org/doblel/Flask-Hooker)
[](https://landscape.io/github/doblel/Flask-Hooker/master)
[](https://github.com/doblel/Flask-Hooker/issues)
###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.
Source Distribution
Flask-Hooker-1.0.2.tar.gz
(3.2 kB
view details)
File details
Details for the file Flask-Hooker-1.0.2.tar.gz.
File metadata
- Download URL: Flask-Hooker-1.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffda4bac8b5c5605b8a2b4e7b1e21140729a8a32c63ac70168ba1619ea7affbd
|
|
| MD5 |
01d946999acd846f5db4b491e959077b
|
|
| BLAKE2b-256 |
befd7c5bd1f40a8bfe1ed58113c64b1208919245482855b2da3b03fe3791d0c3
|