from flask import Flask, jsonify
app = Flask(__name__)
count = 0

@app.route('/')
def counter():
    global count
count = count + 1
return jsonify({'count': count})
if __name__ == '__main__':
    app.run()
How to use shared queues with python flask Restful web services