Author: admin

  • 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…

  • Flask Templates

    In the previous examples, we have returned the simple string as the response from the view function. Although, flask facilitates us to return the response in the form of HTML templates. In this section of the tutorial, we will go through the ways using which we can return the HTML response from the web applications.…

  • Flask HTTP methods

    HTTP is the hypertext transfer protocol which is considered as the foundation of the data transfer in the world wide web. All web frameworks including flask need to provide several HTTP methods for data communication. The methods are given in the following table. SN Method Description 1 GET It is the most common method which…

  • Flask App routing

    App routing is used to map the specific URL with the associated function that is intended to perform some task. It is used to access some particular page like Flask Tutorial in the web application. In our first application, the URL (‘/’) is associated with the home function that returns a particular string displayed on the web…

  • First Flask application

    In this section of the tutorial, we will build our first python website built using the Flask framework. In this process, open any text editor of your choice as we are using the sublime text editor in this tutorial. Write the following lines of code and save to a file named as script.py. Let’s run…

  • Python Flask Tutorial

    Flask Tutorial provides the basic and advanced concepts of the Python Flask framework. Our Flask tutorial is designed for beginners and professionals. Flask is a web framework that provides libraries to build lightweight web applications in python. It is developed by Armin Ronacher who leads an international group of python enthusiasts (POCCO). What is Flask? Flask is…

  • URL Fields in Serializers – Django REST Framework

    When building an API with Django Rest Framework, serializers play a crucial role in defining how data is serialized and deserialized. One of the key features of serializers is the ability to define URL fields, which allow us to link to related objects and resources. In this article, we’ll explore the concept of URL fields…