Obviously, this is not enough for the development of a full-fledged web application. This is where the Flask extensions come in picture. Flask extensions give extensibility to Flask framework.
There are a large number of Flask extensions available. A Flask extension is a Python module, which adds specific type of support to the Flask application. Flask Extension Registry is a directory of extensions available. The required extension can be downloaded by pip utility.
In this tutorial, we will discuss the following important Flask extensions −
- Flask Mail − provides SMTP interface to Flask application
- Flask WTF − adds rendering and validation of WTForms
- Flask SQLAlchemy − adds SQLAlchemy support to Flask application
- Flask Sijax − Interface for Sijax - Python/jQuery library that makes AJAX easy to use in web applications
from flask_foo import [class, function]For versions of Flask later than 0.7, you can also use the syntax −
from flask.ext import fooFor this usage, a compatibility module needs to be activated. It can be installed by running flaskext_compat.py
import flaskext_compat flaskext_compat.activate() from flask.ext import foo
No comments:
Post a Comment