Flask is a micro web framework written in Python based on the Werkzeug toolkit and Jinja2 template engine. It’s mature software with development commencing in 2010. It powers some of the most popular websites.
It’s a microframework intended for getting started very quickly as there’s very little boilerplate code for writing a simple app.
Flask is not a strictly “conventional” framework and relies partly on configuration files.
Key Features
- Contains development server and debugger. It’s recommended to use the flask command line utility; there’s also the option of using Flask.run().
- Integrated support for unit testing. Flask provides a way to test your application by exposing the Werkzeug test client and handling the context locals.
- RESTful request dispatching.
- Uses Jinja2 as its template engine. It’s fast, widely used and secure with the optional sandboxed template execution environment. It’s modelled after Django’s templates. with the default syntax of Jinja2 matching Django syntax in many respects.
- Sandboxed execution – used to evaluate untrusted code.
- Powerful automatic HTML escaping system for XSS prevention.
- Template inheritance – build a base “skeleton” template that contains all the common elements of a site and defines blocks that child templates can override.
- Compiles down to the optimal Python code just in time.
- Optional ahead-of-time template compilation.
- Easy to debug. Line numbers of exceptions directly point to the correct line in the template.
- Configurable syntax.
- Supports extensions that can add extra filters, tests, globals or even extend the parser.
- Integration into other tools such as frameworks, the Babel library or your favourite editor.
- Support for secure cookies (client side sessions).
- 100% Web Server Gateway Interface (WSGI) 1.0 compliant.
- Totally Unicode based when it comes to text.
- Uses thread-local objects internally.
- Flask-Login is an extension which allows you to integrate authentication system into your Flask application easily.
- Pluggable views – create views in the form of classes instead of normally as functions.
- Extensive documentation.
- Built-in integration of the click command line interface.
- Google App Engine compatibility.
- Many extensions are available that make adding new functionality easy.
Website: flask.pocoo.org
Support: GitHub Code Repository, Documentation, Flask Extensions
Developer: Armin Ronacher and contributors
License: BSD License
Flask is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Best Python Micro Frameworks | |
|---|---|
| Flask | Hugely popular microframework based on Werkzeug and Jinja2 |
| FastAPI | Web framework for building APIs |
| Starlette | Lightweight ASGI framework/toolkit |
| aiohttp | Asynchronous HTTP client/server for asyncio and Python |
| Sanic | Web server and web framework |
| Falcon | Build cloud APIs, smart proxies, and app backends |
| Quart | Web microframework based on Asyncio |
| Pyramid | Start small, finish big, stay finished framework |
| Bottle | Fast, simple and lightweight WSGI micro web framework |
| Chalice | Python Serverless Microframework for AWS |
| CherryPy | Mature, minimalist, Python object-oriented web framework |
| TurboGears | Hybrid framework acting as a Full Stack framework or Microframework |
| Quixote | Aimed at sites where complex programming is required |
| Klein | Micro-framework for developing production-ready web services with Python |
| circuits | Lightweight event driven application framework |
| Clastic | Functional web framework |
| Hug | Make developing Python driven APIs as simple as possible |
| MicroPie | Ultra-micro ASGI Python web framework |
| Litestar | Powerful, lightweight, and flexible ASGI framework |
| BlackSheep | Asynchronous Python web framework |
| Robyn | Python web framework designed for high performance |
| Microdot | Small web framework for Python and MicroPython |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

