Skip to main content

Tool for handling Git webhooks

Project description

This is a simple tool that will help you handle Git webhooks. Now it supports the following services:

  • BitBucket
  • GitLab


pip install gwh

Usage cases

If you want to handle any event from any repository:

from gwh import GitWebhook

gwh = GitWebhook()

def event():

If you want to handle push from specific repository:

@gwh.handle(repository="user/repo", types=['push'])
def event():
    if "dev" in gwh.event['affected_branches']:

Finally, you need to pass request from your webserver to GitWebhook handler. It will be Flask in this example:

from flask import Flask, request

app = Flask(__name__)

def webhook():


Bug reports, feature requests, pull requests, any feedback, etc. are welcome.

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 gwh, version 0.1.12
Filename, size File type Python version Upload date Hashes
Filename, size gwh-0.1.12.tar.gz (3.8 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