{"id":25526720,"date":"2022-06-04T21:02:15","date_gmt":"2022-06-04T15:32:15","guid":{"rendered":"https:\/\/entri.app\/blog\/?p=25526720"},"modified":"2023-05-04T16:26:38","modified_gmt":"2023-05-04T10:56:38","slug":"what-is-flask-in-python","status":"publish","type":"post","link":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/","title":{"rendered":"What is Flask in Python?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e1622266207\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e1622266207\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#What_is_Flask\" >What is Flask?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#How_to_use_Flask\" >How to use Flask<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#What_is_Flask_Used_For\" >What is Flask Used For?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#Why_Use_Flask\" >Why Use Flask?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#What_is_Flask_Python\" >What is Flask Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#What_is_a_Web_Framework\" >What is a Web Framework?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#What_is_Flask-2\" >What is Flask?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#Why_is_Flask_a_good_web_framework_choice\" >Why is Flask a good web framework choice?<\/a><\/li><\/ul><\/nav><\/div>\n<article>There are many concepts to learn about\u00a0Python. From syntaxes to frameworks, beginners and even experienced developers need to understand many different concepts. One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask?<\/article>\n<article>\n<h2><a href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-25520910 size-full\" src=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png\" alt=\"Python and Machine Learning Square\" width=\"345\" height=\"345\" srcset=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png 345w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-300x300.png 300w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-150x150.png 150w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-24x24.png 24w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-48x48.png 48w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-96x96.png 96w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-75x75.png 75w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"What_is_Flask\"><\/span><strong>What is Flask?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In simple words,\u00a0<em>Flask is one of the popular frameworks of Python<\/em>, similar to the Django\u00a0framework. However, before we get deep into this topic, let\u2019s look into what\u00a0<em>web frameworks<\/em>\u00a0are.<\/p>\n<p>While writing complex code, programmers do not have enough time to write low-level codes continually. So they use valuable features such as frameworks that deal with low-level concepts such as thread management, protocols, etc. Flask is one such framework.<\/p>\n<p>Flask is built on the\u00a0Werkzeug WSGI\u00a0toolkit and\u00a0Jinja2 template engine,\u00a0both of which are\u00a0Pocoo products.<\/p>\n<p style=\"text-align: center;\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\">&#8220;Ready to take your python skills to the next level? Sign up for a free demo today!&#8221;<\/a><\/strong><\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_use_Flask\"><\/span><strong>How to use Flask<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To use Flask, one needs to install it. Flask is compatible with Python 2.6 or the higher versions.<\/p>\n<h3><strong>Installing Python Flask<\/strong><\/h3>\n<p>To install it, you must first create an isolated environment for it, and this is achieved with the help of a virtual Python environment builder called\u00a0<strong><em>virtualenv<\/em><\/strong><strong>.<\/strong><\/p>\n<p><strong><em>virtualenv<\/em><\/strong>helps users create multiple environments side by side and allows you to work on numerous projects simultaneously on the same machine.<\/p>\n<h4>To install\u00a0<em>virtualenv<\/em>\u00a0on windows:<\/h4>\n<p><strong><code>pip install virtualenv<\/code><\/strong><\/p>\n<p>After installing, the environment is activated using the following:<\/p>\n<p><strong><code>venv\\scripts\\activate<\/code><\/strong><\/p>\n<h4>To install\u00a0<em>virtualenv<\/em>\u00a0on Linux:<\/h4>\n<p><strong>S<code>udo apt-get install virtualenv<\/code><\/strong><\/p>\n<p>After installing the environment is created in,<\/p>\n<p><strong><code>mkdir newproj<\/code><\/strong><\/p>\n<p><strong><code>cd newproj<\/code><\/strong><\/p>\n<p><strong><code>virtualenv venv<\/code><\/strong><\/p>\n<p>After installing, the environment is activated on Linux using the following:<\/p>\n<p><strong><code>venv\/bin\/activate<\/code><\/strong><\/p>\n<p>After the above steps, finally, Flask is installed in Python using,<\/p>\n<p><strong><code>pip install Flask<\/code><\/strong><\/p>\n<h4>To test whether Flask is installed in the editor:<\/h4>\n<p><code>from flask import Flask<\/code><\/p>\n<p><code>app = Flask(__name__) # Flask constructor<\/code><\/p>\n<p><code>@app.route('\/')<\/code><\/p>\n<p><code>def hello_world():<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0return 'Hello World\u2019<\/code><\/p>\n<p><code>if __name__ == '__main__':<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0app.run()<\/code><\/p>\n<p>In the above code,<\/p>\n<ul>\n<li>The current module\u2019s name\u00a0<code>(__name__)<\/code>\u00a0is passed as an input to the Flask function Object().<\/li>\n<\/ul>\n<ul>\n<li>The Flask class\u2019s route() function is a decorator that instructs the application which URL should be used to call the related function.<\/li>\n<\/ul>\n<p><strong>app.route(rule, options)<\/strong><\/p>\n<ul>\n<li>The\u00a0<strong><em>rule<\/em><\/strong>\u00a0parameter represents the function\u2019s URL binding.<\/li>\n<\/ul>\n<ul>\n<li>The parameters to be passed to the underlying\u00a0<strong><em>rule<\/em><\/strong>\u00a0object are listed in the\u00a0<strong><em>options<\/em><\/strong>.<\/li>\n<\/ul>\n<ul>\n<li>Since in this code, the URL \u2018\/\u2019 is bound with the function\u00a0<strong><code>hello_world()<\/code>,\u00a0<\/strong>the output of this function will be released when the homepage of the webserver is opened in the browser.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"What_is_Flask_Used_For\"><\/span><strong>What is Flask Used For?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>It offers a plethora of features to developers looking forward to building complex web or mobile applications.\u00a0With the help of Flask, you can build blogging platforms, content sites, and many more complex applications.<\/p>\n<p>To start the flask application, we use the\u00a0<strong><em><code>run()<\/code><\/em><\/strong>\u00a0function:<\/p>\n<p><strong><code>app.run()<\/code><\/strong><\/p>\n<p>The above code is used to start the function, but while working on a code and making changes, the server must be reloaded on its own. But, the server does not reload on its own but manually. To avoid such minor inconvenience, we use the\u00a0<strong><em>debug<\/em><\/strong>\u00a0property.<\/p>\n<p>Using the debug property, the server reloads on its own at every code change and will also help in tracking errors.<\/p>\n<p>The\u00a0<strong>debug<\/strong>\u00a0property is added as follows:<\/p>\n<p><code>app.debug = True<\/code><\/p>\n<p><code>app.run()<\/code><\/p>\n<p><code>app.run(debug = True)<\/code><\/p>\n<h3><strong>Routing:<\/strong><\/h3>\n<p>Another primary reason to use Flask is for its routing property.<\/p>\n<p>For the users to not confuse with the URLs, web frameworks provide routing techniques helping the user remember the URLs.<\/p>\n<p>Navigating directly to a web page without leaving the Home page by using routing is possible.<\/p>\n<p>This is achieved by the\u00a0<strong><em><code>route()<\/code><\/em><\/strong>\u00a0decorator that binds the URL to a function:<\/p>\n<p><code>@app.route('\/hello')<\/code><\/p>\n<p><code>def hello_world():<\/code><\/p>\n<p><code>return 'hello world'<\/code><\/p>\n<p>The hello-world() function is connected to the URL \u2018\/hello\u2019 rule. As a result, when a visitor hits http:\/\/localhost:5000\/hello, the browser will display the output of the hello world() function.<\/p>\n<\/article>\n<article>\n<h2><span class=\"ez-toc-section\" id=\"Why_Use_Flask\"><\/span><strong>Why Use Flask?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You may use it to\u00a0construct complicated and straightforward web applications and applications that are integrated with machine learning algorithms. Developers can make use of their lightweight framework to:<\/p>\n<ul>\n<li>Integrated support for unit testing<\/li>\n<li>Support for secure cookies<\/li>\n<li>Create APIs easily<\/li>\n<li>Supports Visual Debugging<\/li>\n<li>Can be integrated efficiently with all the major databases integrate easily with complex databases<\/li>\n<li>Use Ninja Templating Engine<\/li>\n<\/ul>\n<p>Also, it is easier to grasp compared to other frameworks.<\/p>\n<p style=\"text-align: center;\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\">&#8220;Experience the power of our web development course with a free demo &#8211; enroll now!&#8221;<\/a><\/strong><\/p>\n<\/article>\n<div class=\"blog-body__share\">\n<div class=\"blog-body__share-label\">\n<h2 class=\"post-title\"><span class=\"ez-toc-section\" id=\"What_is_Flask_Python\"><\/span><strong>What is Flask Python<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<section class=\"post-content\">Flask is a web framework, it\u2019s a Python module that lets you develop web applications easily. It\u2019s has a small and easy-to-extend core, it\u2019s a microframework that doesn\u2019t include an ORM (Object Relational Manager) or such features.It does have many cool features like url routing, template engine. It is a WSGI web app framework.<\/section>\n<section class=\"post-content\">\n<h2 id=\"What-is-a-Web-Framework\"><span class=\"ez-toc-section\" id=\"What_is_a_Web_Framework\"><\/span><strong>What is a Web Framework?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A Web Application Framework or a simply a Web Framework represents a collection of libraries and modules that enable web application developers to write applications without worrying about low-level details such as protocol, thread management, and so on.<\/p>\n<h2 id=\"What-is-Flask\"><span class=\"ez-toc-section\" id=\"What_is_Flask-2\"><\/span><strong>What is Flask?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Flask is a web application framework written in Python. It was developed by Armin Ronacher, who led a team of international Python enthusiasts called Poocco. Flask is based on the Werkzeg WSGI toolkit and the Jinja2 template engine.Both are Pocco projects.<\/p>\n<h3 id=\"WSGI\"><strong>WSGI<\/strong><\/h3>\n<p>The Web Server Gateway Interface (Web Server Gateway Interface, WSGI) has been used as a standard for Python web application development. WSGI is the specification of a common interface between web servers and web applications.<\/p>\n<h3 id=\"Werkzeug\"><strong>Werkzeug<\/strong><\/h3>\n<p>Werkzeug is a WSGI toolkit that implements requests, response objects, and utility functions. This enables a web frame to be built on it. The Flask framework uses Werkzeg as one of its bases.<\/p>\n<h3 id=\"jinja2\"><strong>jinja2<\/strong><\/h3>\n<p>jinja2 is a popular template engine for Python.A web template system combines a template with a specific data source to render a dynamic web page.<\/p>\n<p>This allows you to pass Python variables into HTML templates like this:<\/p>\n<figure class=\"highlight html\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\"><span class=\"tag\">&lt;<span class=\"name\">html<\/span>&gt;<\/span><\/span>\r\n<span class=\"line\">    <span class=\"tag\">&lt;<span class=\"name\">head<\/span>&gt;<\/span><\/span>\r\n<span class=\"line\">        <span class=\"tag\">&lt;<span class=\"name\">title<\/span>&gt;<\/span>{{ title }}<span class=\"tag\">&lt;\/<span class=\"name\">title<\/span>&gt;<\/span><\/span>\r\n<span class=\"line\">    <span class=\"tag\">&lt;\/<span class=\"name\">head<\/span>&gt;<\/span><\/span>\r\n<span class=\"line\">    <span class=\"tag\">&lt;<span class=\"name\">body<\/span>&gt;<\/span><\/span>\r\n<span class=\"line\">        <span class=\"tag\">&lt;<span class=\"name\">h1<\/span>&gt;<\/span>Hello {{ username }}<span class=\"tag\">&lt;\/<span class=\"name\">h1<\/span>&gt;<\/span><\/span>\r\n<span class=\"line\">    <span class=\"tag\">&lt;\/<span class=\"name\">body<\/span>&gt;<\/span><\/span>\r\n<span class=\"line\"><span class=\"tag\">&lt;\/<span class=\"name\">html<\/span>&gt;<\/span><\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h3 id=\"Microframework\"><strong>Microframework<\/strong><\/h3>\n<p>Flask is often referred to as a microframework. It is designed to keep the core of the application simple and scalable.<\/p>\n<p>Flask supports extensions to add such capabilities to the application.<\/p>\n<h2 id=\"Why-is-Flask-a-good-web-framework-choice\"><span class=\"ez-toc-section\" id=\"Why_is_Flask_a_good_web_framework_choice\"><\/span><strong>Why is Flask a good web framework choice?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Unlike the Django framework, Flask is very Pythonic. It\u2019s easy to get started with Flask, because it doesn\u2019t have a huge learning curve.<\/p>\n<p>On top of that it\u2019s very explicit, which increases readability. To create the \u201cHello World\u201d app, you only need a few lines of code.<\/p>\n<p>This is a boilerplate code example.<\/p>\n<figure class=\"highlight python\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\"><span class=\"keyword\">from<\/span> flask <span class=\"keyword\">import<\/span> Flask<\/span>\r\n<span class=\"line\">app = Flask(__name__)<\/span>\r\n\r\n<span class=\"line\"><span class=\"meta\">@app.route('\/')<\/span><\/span>\r\n<span class=\"line\"><span class=\"function\"><span class=\"keyword\">def<\/span> <span class=\"title\">hello_world<\/span><span class=\"params\">()<\/span>:<\/span><\/span>\r\n<span class=\"line\">    <span class=\"keyword\">return<\/span> <span class=\"string\">'Hello World!'<\/span><\/span>\r\n\r\n<span class=\"line\"><span class=\"keyword\">if<\/span> __name__ == <span class=\"string\">'__main__'<\/span>:<\/span>\r\n<span class=\"line\">    app.run()<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>If you want to develop on your local computer, you can do so easily. Save this program as\u00a0<code>server.py<\/code>\u00a0and run it with\u00a0<code>python server.py<\/code>.<\/p>\n<figure class=\"highlight bash\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre><span class=\"line\">$ python server.py<\/span>\r\n<span class=\"line\"> * Serving Flask app <span class=\"string\">\"hello\"<\/span><\/span>\r\n<span class=\"line\"> * Running on http:\/\/127.0.0.1:5000\/ (Press CTRL+C to quit)<\/span><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>It then starts a web server which is available only on your computer. In a web browser open localhost on port 5000 (the url) and you\u2019ll see \u201cHello World\u201d show up.<\/p>\n<p>It\u2019s a microframework, but that doesn\u2019t mean your whole app should be inside one single Python file. You can and should use many files for larger programs, to handle complexity.<\/p>\n<p>Micro means that the Flask framework is simple but extensible. You may all the decisions: which database to use, do you want an ORM etc, Flask doesn\u2019t decide for you.<\/p>\n<p>Flask is one of the most popular web frameworks, meaning it\u2019s up-to-date and modern. You can easily extend it\u2019s functionality. You can scale it up for complex applications.<\/p>\n<p><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-25520910 size-full\" src=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png\" alt=\"Python and Machine Learning Square\" width=\"345\" height=\"345\" srcset=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png 345w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-300x300.png 300w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-150x150.png 150w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-24x24.png 24w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-48x48.png 48w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-96x96.png 96w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-75x75.png 75w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\">&#8220;Get hands-on with our python course &#8211; sign up for a free demo!&#8221;<\/a><\/strong><\/p>\n<h4><strong>Related Articles<\/strong><\/h4>\n<div class=\"table-responsive wprt_style_display\">\n<div class=\"table-responsive wprt_style_display\">\n<div class=\"table-responsive wprt_style_display\">\n<div class=\"table-responsive wprt_style_display\">\n<div class=\"table-responsive wprt_style_display\">\n<table class=\"table\" dir=\"ltr\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"329\" \/>\n<col width=\"309\" \/><\/colgroup>\n<tbody>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Syllabus&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-village-field-assistant-vfa-syllabus-exam-pattern\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/step-by-step-guide-for-getting-a-job-as-a-python-developer\/42\" target=\"_blank\" rel=\"noopener\">A Step-by-Step Guide for Getting a Job as a Python Developer<\/a><\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Mock Test&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-free-mock-test\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/learn-about-python-keywords-and-identifiers-an-overview\/\" target=\"_blank\" rel=\"noopener\">Learn About Python Keywords and Identifiers<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Exam Date&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-exam-date\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/type-conversion-in-python\/\" target=\"_blank\" rel=\"noopener\">What is Type Conversion in Python?<\/a><\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Video Course&quot;}\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/constructors-and-destructors-in-python\/\" target=\"_blank\" rel=\"noopener\">What are Constructors and Destructors in Python?<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Application Form&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-apply-online\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/python-online-course\/\" target=\"_blank\" rel=\"noopener\">Best Online Python Course with Certificate<\/a><\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Study Materials&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-study-material\/\"><a href=\"https:\/\/entri.app\/blog\/switch-case-in-python-switch-function\/\"><strong>Switch Case in Python<\/strong><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are many concepts to learn about\u00a0Python. From syntaxes to frameworks, beginners and even experienced developers need to understand many different concepts. One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask? What is Flask? In simple words,\u00a0Flask is one [&hellip;]<\/p>\n","protected":false},"author":111,"featured_media":25526949,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[802,1888],"tags":[],"class_list":["post-25526720","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-python-programming"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Flask in Python? - Entri Blog<\/title>\n<meta name=\"description\" content=\"One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Flask in Python? - Entri Blog\" \/>\n<meta property=\"og:description\" content=\"One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Entri Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/entri.me\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-04T15:32:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-04T10:56:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png\" \/>\n\t<meta property=\"og:image:width\" content=\"820\" \/>\n\t<meta property=\"og:image:height\" content=\"615\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Feeba Mahin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@entri_app\" \/>\n<meta name=\"twitter:site\" content=\"@entri_app\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Feeba Mahin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/\"},\"author\":{\"name\":\"Feeba Mahin\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36\"},\"headline\":\"What is Flask in Python?\",\"datePublished\":\"2022-06-04T15:32:15+00:00\",\"dateModified\":\"2023-05-04T10:56:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/\"},\"wordCount\":1256,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png\",\"articleSection\":[\"Articles\",\"Python Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/\",\"url\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/\",\"name\":\"What is Flask in Python? - Entri Blog\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png\",\"datePublished\":\"2022-06-04T15:32:15+00:00\",\"dateModified\":\"2023-05-04T10:56:38+00:00\",\"description\":\"One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask?\",\"breadcrumb\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png\",\"width\":820,\"height\":615,\"caption\":\"What is Flask in Python.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/entri.app\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Programming\",\"item\":\"https:\/\/entri.app\/blog\/category\/python-programming\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What is Flask in Python?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/entri.app\/blog\/#website\",\"url\":\"https:\/\/entri.app\/blog\/\",\"name\":\"Entri Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/entri.app\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/entri.app\/blog\/#organization\",\"name\":\"Entri App\",\"url\":\"https:\/\/entri.app\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"width\":989,\"height\":446,\"caption\":\"Entri App\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/entri.me\/\",\"https:\/\/x.com\/entri_app\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36\",\"name\":\"Feeba Mahin\",\"url\":\"https:\/\/entri.app\/blog\/author\/feeba123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Flask in Python? - Entri Blog","description":"One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/","og_locale":"en_US","og_type":"article","og_title":"What is Flask in Python? - Entri Blog","og_description":"One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask?","og_url":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/","og_site_name":"Entri Blog","article_publisher":"https:\/\/www.facebook.com\/entri.me\/","article_published_time":"2022-06-04T15:32:15+00:00","article_modified_time":"2023-05-04T10:56:38+00:00","og_image":[{"width":820,"height":615,"url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png","type":"image\/png"}],"author":"Feeba Mahin","twitter_card":"summary_large_image","twitter_creator":"@entri_app","twitter_site":"@entri_app","twitter_misc":{"Written by":"Feeba Mahin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#article","isPartOf":{"@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/"},"author":{"name":"Feeba Mahin","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36"},"headline":"What is Flask in Python?","datePublished":"2022-06-04T15:32:15+00:00","dateModified":"2023-05-04T10:56:38+00:00","mainEntityOfPage":{"@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/"},"wordCount":1256,"commentCount":0,"publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"image":{"@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png","articleSection":["Articles","Python Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/entri.app\/blog\/what-is-flask-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/","url":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/","name":"What is Flask in Python? - Entri Blog","isPartOf":{"@id":"https:\/\/entri.app\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage"},"image":{"@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png","datePublished":"2022-06-04T15:32:15+00:00","dateModified":"2023-05-04T10:56:38+00:00","description":"One such helpful concept that provides enough flexibility to developers in enhancing the program is Flask. So, in this article, we ask, what is Flask?","breadcrumb":{"@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/entri.app\/blog\/what-is-flask-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#primaryimage","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Flask-in-Python..png","width":820,"height":615,"caption":"What is Flask in Python."},{"@type":"BreadcrumbList","@id":"https:\/\/entri.app\/blog\/what-is-flask-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/entri.app\/blog\/"},{"@type":"ListItem","position":2,"name":"Python Programming","item":"https:\/\/entri.app\/blog\/category\/python-programming\/"},{"@type":"ListItem","position":3,"name":"What is Flask in Python?"}]},{"@type":"WebSite","@id":"https:\/\/entri.app\/blog\/#website","url":"https:\/\/entri.app\/blog\/","name":"Entri Blog","description":"","publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/entri.app\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/entri.app\/blog\/#organization","name":"Entri App","url":"https:\/\/entri.app\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","width":989,"height":446,"caption":"Entri App"},"image":{"@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/entri.me\/","https:\/\/x.com\/entri_app"]},{"@type":"Person","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36","name":"Feeba Mahin","url":"https:\/\/entri.app\/blog\/author\/feeba123\/"}]}},"_links":{"self":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25526720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/users\/111"}],"replies":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/comments?post=25526720"}],"version-history":[{"count":8,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25526720\/revisions"}],"predecessor-version":[{"id":25559585,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25526720\/revisions\/25559585"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media\/25526949"}],"wp:attachment":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media?parent=25526720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/categories?post=25526720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/tags?post=25526720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}