Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Django-powered GitHub (& Bitbucket) web hooks

Project description

Simple continuous integration for Django developers, taking the form of a Django app for managing GitHub (or BitBucket) post receive hooks.

Tested on Python 2.7, 3.4 and 3.5, with Django 1.8 and 1.9.


  • pip install django-github-hook
  • Add github_hook to INSTALLED_APPS in your
  • ./ migrate (or ./ syncdb)
  • Add e.g. url(r'^hook/', include('github_hook.urls')) to your urlpatterns
  • Log into the Django admin console
  • Configure your hook with the folowing fields:
    • Name: Hook identifier
    • User: Repo username
    • Repo: Repo name
    • Path: Absolute path to script to execute
  • Go to your repo’s “Service Hooks” settings on GitHub (or BitBucket) and add a WebHook/POST URL:
    • http[s]://[yourwebsite]/hook
    • The repo information will be read from the JSON payload
  • Alternatively, you can specify a specific hook by name:
    • http[s]://[yourwebsite]/hook/name


The following snippet show how to connect the webhook to a method using django’s signal mechanism. Note that path must be set to “send-signal” in the hook object instead of an absolute path to a script.

from github_hook.models import hook_signal

def processWebhook(sender, **kwargs):
        for key, value in kwargs.iteritems():
                print key, value


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 django-github-hook, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size django-github-hook-0.2.1.tar.gz (3.7 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