Skip to content

Commit ca18554

Browse files
Backport comments from docs.
1 parent 0f09c51 commit ca18554

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ orginally developed for Bloomberg's GHE install.
1313
receives push events all it takes is:
1414

1515
```py
16-
from flask import Flask
1716
from github_webhook import Webhook
17+
from flask import Flask
1818

19-
app = Flask(__name__)
20-
webhook = Webhook(app)
19+
app = Flask(__name__) # Standard Flask app
20+
webhook = Webhook(app) # Defines '/postreceive' endpoint
2121

22-
@app.route("/")
22+
@app.route("/") # Standard Flask endpoint
2323
def hello_world():
2424
return "Hello, World!"
2525

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

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

0 commit comments

Comments
 (0)