Flask
A lightweight Python web microframework.
Flask is a small Python web microframework that provides routing, request and response objects, Jinja2 templating, and a session implementation, and leaves most other concerns — database access, form handling, user authentication, REST API serialisation — to optional extensions. The result is an unusually flexible framework that can be assembled to fit small APIs and prototypes as well as much larger applications.
Armin Ronacher started Flask in 2010 as an April Fools' joke that turned out to be useful: a single-file framework whose first line of code was a deliberate parody of how minimal Python web frameworks could pretend to be. The project is now part of the Pallets organisation along with Jinja, Click, Werkzeug, and several other Python web utilities, and is BSD-3-licensed.
Flask has a smaller built-in feature set than Django but a correspondingly larger ecosystem of extensions (Flask-SQLAlchemy, Flask-Login, Flask-WTF, Flask-RESTful, and many others). For machine-learning model-serving APIs, small-to-medium internal tools, and webhooks, Flask remains one of the most common choices in Python.
Install
pip install flask
Authors
- Armin Ronacher (creator)
- Pallets Projects