We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f09c51 commit ca18554Copy full SHA for ca18554
1 file changed
README.md
@@ -13,19 +13,19 @@ orginally developed for Bloomberg's GHE install.
13
receives push events all it takes is:
14
15
```py
16
-from flask import Flask
17
from github_webhook import Webhook
+from flask import Flask
18
19
-app = Flask(__name__)
20
-webhook = Webhook(app)
+app = Flask(__name__) # Standard Flask app
+webhook = Webhook(app) # Defines '/postreceive' endpoint
21
22
-@app.route("/")
+@app.route("/") # Standard Flask endpoint
23
def hello_world():
24
return "Hello, World!"
25
26
-@webhook.hook()
+@webhook.hook() # Defines a handler for the 'push' event
27
def on_push(data):
28
- print "Got push with: {0}".format(data)
+ print("Got push with: {0}".format(data))
29
30
if __name__ == "__main__":
31
app.run(host="0.0.0.0", port=80)
0 commit comments