GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • index
  • next
  • python-github-webhook 1.0 documentation
  • References
  • Show Source

This view

  • Original page
  • New address

GeezerVison is showing bloomberg.github.io — Welcome to python-github-webhook’s documentation! — python-github-webhook 1.0 documentation

Welcome to python-github-webhook’s documentation!¶

Very simple, but powerful, microframework for writing Github webhooks in Python.

from github_webhook import Webhook
from flask import Flask

app = Flask(__name__)  # Standard Flask app
webhook = Webhook(app) # Defines '/postreceive' endpoint

@app.route("/")        # Standard Flask endpoint
def hello_world():
    return "Hello, World!"

@webhook.hook()        # Defines a handler for the 'push' event
def on_push(data):
    print("Got push with: {0}".format(data))

if __name__ == "__main__":
  app.run(host="0.0.0.0", port=80)

Contents:

  • API Reference
  • References
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.