Flask: Counter
examples/flask/counter/app.py
from flask import Flask app = Flask(__name__) counter = 1 @app.route("/") def main(): global counter counter += 1 return str(counter)
Access the page from several browsers. There is one single counter that lives as long as the process lives.