Category: Flask

  • Flask-WTF

    Why WTF Useful? WTF is useful due to the following factors. The WT Forms is a flexible, form rendering, and validation library used to provide the user interface. Install Flask-WTF To use the WT forms, we need to install the flask-wtf library which can be installed using pip installer. The module contains a Form class…

  • Flask SQLAlchemy

    Flask SQLAlchemy is an ORM tool which establishes the relationship between the objects and the tables of the relational databases. The mapping between the both is important because the python is capable of storing the data in the form of objects whereas the database stores the data in the form of relational tables, i.e. the…

  • Flask SQLite

    Flask can make use of the SQLite3 module of the python to create the database web applications. In this section of the tutorial, we will create a CRUD (create – read – update – delete) application. Since we have given a detailed overview of how a python application can interact with the SQLite database, to…

  • Flask-Mail Extension

    Considering the fact that flask is a micro framework, it has its limitations in providing the facilities to the developer. Although, there are several extensions to the flask like Mail, WTF, SQLite, SQLAlchemy, etc. which facilitates the developer to provide some basic facilities to the user. In this section of the tutorial, we will study…

  • Flask Flashing

    In the web applications, there are scenarios where the developer might need to flash the messages to provide feedback to the users for the behavior of the application in different cases. Flask provides the flash() method, in the same way, the client-side scripting language like JavaScript uses the alerts or the python GUI framework Tkinter…

  • Flask Redirect and Errors

    Flask class provides the redirect() function which redirects the user to some specified URL with the specified status code. An HTTP status code is a response from the server to the request of the browser. When we visit a website, a request is sent to the server, and the server then responds to the browser’s…

  • Flask File Uploading

    File uploading is the process of transmitting the binary or normal files to the server. Flask facilitates us to upload the files easily. All we need to have an HTML form with the encryption set to multipart/form-data. The server-side flask script fetches the file from the request object using request.files[] Object. On successfully uploading the…

  • Flask Session

    The concept of a session is very much similar to that of a cookie. However, the session data is stored on the server. The session can be defined as the duration for which a user logs into the server and logs out. The data which is used to track this session is stored into the…

  • Flask Cookies

    The cookies are stored in the form of text files on the client’s machine. Cookies are used to track the user’s activities on the web and reflect some suggestions according to the user’s choices to enhance the user’s experience. Cookies are set by the server on the client’s machine which will be associated with the…

  • Flask Request Object

    In the client-server architecture, the request object contains all the data that is sent from the client to the server. As we have already discussed in the tutorial, we can retrieve the data at the server side using the HTTP methods. In this section of the tutorial, we will discuss the Request object and its…