from flask import Flask app = Flask(__name__) @app.route('/<username>') def hello_world(username): return 'Hello %s!' % username @app.route("/user/<int:id>") def hello_page(id): return "This is page %d" % id if __name__ == '__main__': app.run(debug=True)