title: How can I add webhook events to a flask server?
body: <p>I have been searching everywhere for tutorials on how to create and implement webhooks which listen for events within a back-end API. For instance, if I had a server written in python flask, how would I listen to server-side events (example: user has created 100 total records) which then executes some more back-end code or requests external data? </p>
  
  <pre class="lang-py prettyprint-override"><code>from flask import Flask
  app = Flask(__name__)
  
  
  @app.route('/')
  def index():
      return {"status": 200}
  
  #Some webhook code listening for events in the server
  
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>What do I write to listen for server events?</p>