from ratelimit import limits
from flask import Flask
from flask import render_template
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
@app.route('/index')
@limits(calls = 100,period = 1)
def hello():
return render_template('index.html')
限制该web应用每1s中只能被访问100次