def go_to_one(param):
    return param.split('/')[-1]

@app.route("/<regex('[^0-9]+'):param>/")
def go_to_two(param):
    return param

@app.route('/')
def hello_world():
    return 'Hello World!'
if __name__ == '__main__':
    app.run()
Define a route for url ending with integer in python