Flask
suggest changeIntroduction
Flask is a Python micro web framework used to run major websites including Pinterest, Twilio, and LinkedIn. This topic explains and demonstrates the variety of features Flask offers for both front and back end web development.
Syntax
@app.route("/urlpath", methods=["GET", "POST", "DELETE", "PUT", "HEAD", "OPTIONS"])@app.route("/urlpath/<param>", methods=["GET", "POST", "DELETE", "PUT", "HEAD", "OPTIONS"])
The method is PUT, not PUTS. If methods is omitted, the route accepts GET, and Flask also answers HEAD for that route.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents