
Welcome to Flask — Flask Documentation (3.1.x)
Flask provides configuration and conventions, with sensible defaults, to get started. This section of the documentation explains the different parts of the Flask framework and how they can be used, …
Installation — Flask Documentation (3.1.x)
Installation Python Version ¶ We recommend using the latest version of Python. Flask supports Python 3.9 and newer. Dependencies ¶ These distributions will be installed automatically when installing …
Quickstart — Flask Documentation (3.1.x)
Flask provides a really simple way to give feedback to a user with the flashing system. The flashing system basically makes it possible to record a message at the end of a request and access it on the …
API — Flask Documentation (3.1.x)
API ¶ This part of the documentation covers all the interfaces of Flask. For parts where Flask depends on external libraries, we document the most important right here and provide links to the canonical …
Tutorial — Flask Documentation (3.1.x)
The tutorial only uses what’s provided by Flask and Python. In another project, you might decide to use Extensions or other libraries to make some tasks simpler. Flask is flexible. It doesn’t require you to …
Project Layout — Flask Documentation (3.1.x)
from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello, World!' However, as a project gets bigger, it becomes overwhelming to keep all the code in one file. Python …
Using async and await — Flask Documentation (3.1.x)
Traditional Flask views will still be appropriate for most use cases, but Flask’s async support enables writing and using code that wasn’t possible natively before. Background tasks ¶ Async functions will …
Changes — Flask Documentation (3.1.x)
Aug 19, 2025 · Flask and Blueprint now provide a get_send_file_max_age hook for subclasses to override behavior of serving static files from Flask when using Flask.send_static_file (used for the …
Uploading Files — Flask Documentation (3.1.x)
Uploading Files ¶ Ah yes, the good old problem of file uploads. The basic idea of file uploads is actually quite simple. It basically works like this: A <form> tag is marked with enctype=multipart/form-data …
Logging — Flask Documentation (3.1.x)
Logging ¶ Flask uses standard Python logging. Messages about your Flask application are logged with app.logger, which takes the same name as app.name. This logger can also be used to log your own …