Coding

Flask – Microframework for Python based on Werkzeug, Jinja2

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
FlaskHugely popular microframework based on Werkzeug and Jinja2
FastAPIWeb framework for building APIs
StarletteLightweight ASGI framework/toolkit
aiohttpAsynchronous HTTP client/server for asyncio and Python
SanicWeb server and web framework
FalconBuild cloud APIs, smart proxies, and app backends
QuartWeb microframework based on Asyncio
PyramidStart small, finish big, stay finished framework
BottleFast, simple and lightweight WSGI micro web framework
ChalicePython Serverless Microframework for AWS
CherryPyMature, minimalist, Python object-oriented web framework
TurboGearsHybrid framework acting as a Full Stack framework or Microframework
QuixoteAimed at sites where complex programming is required
KleinMicro-framework for developing production-ready web services with Python
circuitsLightweight event driven application framework
ClasticFunctional web framework
HugMake developing Python driven APIs as simple as possible
MicroPieUltra-micro ASGI Python web framework
LitestarPowerful, lightweight, and flexible ASGI framework
BlackSheepAsynchronous Python web framework
RobynPython web framework designed for high performance
MicrodotSmall web framework for Python and MicroPython

Read our verdict in the software roundup.


Best Free and Open Source Software 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.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted