Overview
Flask 3.0, released on October 1, 2023, drops Python 3.7, adds native type hints and migrates to importlib for resource loading.
Main Features
Type annotations now cover the entire public API. Replacing pkg_resources with importlib.metadata improves startup times.
python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index() -> str:
return '<h1>Flask 3.0</h1>'
