

{"id":113170,"date":"2023-07-14T07:11:08","date_gmt":"2023-07-14T01:41:08","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=113170"},"modified":"2023-07-14T19:11:38","modified_gmt":"2023-07-14T13:41:38","slug":"install-flask-in-easy-steps","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/","title":{"rendered":"Install Flask in Easy Steps"},"content":{"rendered":"<p>One of the most well-known Python web application frameworks is Flask. This microframework was created to be simple and quick to implement. Flask gains greater capabilities through extension with libraries and tools to support more complicated projects.<\/p>\n<p>In essence, Flask is a Python module. It is a framework for web development that can only be used with Python. It is a group of modules and libraries. Web platform development uses frameworks. Such a web application framework is Flask. The entire thing was created in Python. It is only coded in Python, unlike Django. Flask is going to be utilised by a new user. because handling it is simpler. Since Flask is solely written in Python, Python must already be installed on the computer before installing Flask. Moreover, Python Pip needs to be set up. The most recent version of Py Pip is currently set up.<\/p>\n<p>For new Web Framework users, Flask is simple to use and comprehend. It may also be used as an extension for any third-party plugin. Moreover, it is employed in prototyping.<\/p>\n<h3>Describing Pip<\/h3>\n<p>Python modules and packages are managed via Pip. You may download pip as well as a virtual environment by following the detailed instructions in the official Python guide.<\/p>\n<p>We must install Python because the Flask web platform is based on the programming language Python. Although it&#8217;s possible that Python is already installed on your system, you can check by typing the following command into your console or cmd (in Windows):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$  python --version\r\nPython 2.7.17\r\n$  python3 --version\r\nPython 3.6.9\r\n<\/pre>\n<h3>Setting a virtual environment in place<\/h3>\n<p>A virtual environment is a device that assists in maintaining the separation of dependencies needed for various projects.<\/p>\n<p>You can work on many projects that require various dependencies in a virtual environment. You might have a project that needs your Flask application to use SQLAlchemy, but you don&#8217;t want this specific requirement to be a global one in all projects. It would be best to use a virtual environment because you have control over that. You must have Pip installed in order to set up your virtual environment.<\/p>\n<h4>Linux installation of virtualenv<\/h4>\n<p>Virtualenv is offered by the Linux package managers:<\/p>\n<ul>\n<li>Start by launching the Linux terminal on Debian\/Ubuntu.<\/li>\n<li>On Debian, Ubuntu, and other comparable distributions, use apt to download virtualenv:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt install python-virtualenv\r\n<\/pre>\n<p><strong>Using Red Hat, Fedora, or CentOS:<\/strong><\/p>\n<ul>\n<li>Launch the Linux terminal.<\/li>\n<li>For CentOS, Red Hat, Fedora, and comparable systems, use yum to setup virtualenv:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo yum install python-virtualenv\r\n<\/pre>\n<h4>Configure virtualenv on Mac OS<\/h4>\n<ul>\n<li>Start up the terminal.<\/li>\n<li>Using pip, set up virtualenv on a Mac:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo python2 -m pip install virtualenv\r\n<\/pre>\n<h4>Configure virtualenv on Windows<\/h4>\n<ul>\n<li>With administrator rights, launch the command prompt.<\/li>\n<li>Using pip to set up virtualenv on Windows:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">py -2 -m pip install virtualenv\r\n<\/pre>\n<h3>Building a Flask Setup<\/h3>\n<p>Move into the project directory after creating a separate one for it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">mkdir &lt;project_name&gt;\r\ncd &lt;project_name&gt;\r\n<\/pre>\n<h4>Creating an Environment in MacOS and Linux<\/h4>\n<p>Use the venv package and give your Python 3 virtual environment a name to establish a virtual environment:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">python3 -m venv &lt;name of environment&gt;\r\n<\/pre>\n<h4>Creating an Environment in Windows<\/h4>\n<p>In Python 3, make a virtual environment and give it a name using:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">py -3 -m venv &lt;name of environment&gt;\r\n<\/pre>\n<h3>Make the Environment Active<\/h3>\n<p>Install Flask after activating the virtual environment. After activation, the hostname of the enabled environment appears in the CLI.<\/p>\n<h4>On Linux and MacOS, activate the environment<\/h4>\n<p>With Linux and MacOS, enable the virtual environment by using:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;name of environment&gt;\/bin\/activate\r\n<\/pre>\n<h4>Enable Windows&#8217; Environment<\/h4>\n<p>To turn on the virtual environment on Windows, do this:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;name of environment&gt;\\Scripts\\activate\r\n<\/pre>\n<h3>Setting up Flask<\/h3>\n<p>Using pip, install Flask in the activated environment:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install Flask\r\n<\/pre>\n<h3>The development environment is being tested<\/h3>\n<ul>\n<li>To test the newly built development environment, create a basic Flask application.<\/li>\n<li>Create a file named hello.py and place it in the Python project folder.<\/li>\n<li>To create an application that outputs &#8220;Hello world!&#8221; paste the code to the folder using a text editor:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from flask import Flask\r\napplication = Flask(__name__)\r\n@application.route('\/')\r\ndef function():\r\n    return 'Welcome Students!!!'\r\n<\/pre>\n<ul>\n<li>Save the file, then exit.<\/li>\n<li>Using the cd command in the console, go to the project folder.<\/li>\n<li>Configure the environment variable FLASK APP.<\/li>\n<\/ul>\n<p><strong>For Mac and Linux:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">export FLASK_APP=hello.py\r\n<\/pre>\n<p><strong>Windows:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">setx FLASK_APP \"hello.py\"\r\n<\/pre>\n<ul>\n<li>Start the Flask application by using:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">flask run\r\n<\/pre>\n<ul>\n<li>The address and a confirmation message are printed in the output.<\/li>\n<\/ul>\n<h3>Flask environment with Ngrok<\/h3>\n<p><strong>1. Install Flask:<\/strong> First, you need to install Flask using pip. You can do this by opening a command prompt and typing<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install Flask\r\n<\/pre>\n<p><strong>2. Create a Flask app:<\/strong> Next, create a simple Flask app that will display a &#8220;Hello, World!&#8221; message. Create a new Python file called app.py and enter the following code:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from flask import Flask\r\n\r\napp = Flask(__name__)\r\n\r\n@app.route(\"\/\")\r\ndef hello():\r\n    return \"Hello, World!\"\r\n\r\nif __name__ == \"__main__\":\r\n    app.run()\r\n<\/pre>\n<p><strong>3. Test the Flask app:<\/strong> To test the Flask app, open a command prompt and navigate to the directory where the app.py file is located. Then, type the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">python app.py\r\n<\/pre>\n<p><strong>4. Install Ngrok:<\/strong> Ngrok is a tool that allows you to expose your local web server to the internet. You can download it from the Ngrok website.<\/p>\n<p><strong>5. Run Ngrok<\/strong>: Open a new command prompt and navigate to the directory where you downloaded Ngrok. Then, type the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ngrok http 5000\r\n<\/pre>\n<p><strong>6. Test the public URL:<\/strong> Open a web browser and go to the public URL that Ngrok generated. You should see the same &#8220;Hello, World!&#8221; message that you saw when you visited http:\/\/localhost:5000\/. You can now share this public URL with others, and they will be able to access your Flask app running on your local machine.<\/p>\n<h3>Install Flask and the Twilio Python SDK:<\/h3>\n<p>To install Flask and the Twilio Python SDK, you can follow these steps:<\/p>\n<p><strong>1. Install Python:<\/strong> If you haven&#8217;t already, download and install the latest version of Python from the official website.<\/p>\n<p><strong>2. Install Flask:<\/strong> Once Python is installed, you can install Flask using pip, the package installer for Python. Open your terminal or command prompt and run the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install Flask\r\n<\/pre>\n<p>3. This will download and install Flask and all of its dependencies.<\/p>\n<p>Install the Twilio Python SDK: Next, you&#8217;ll need to install the Twilio Python SDK, which allows you to send and receive SMS and MMS messages, make and receive phone calls, and more. To install the Twilio Python SDK, run the following command in your terminal:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install twilio\r\n<\/pre>\n<p>This will download and install the Twilio Python SDK and all of its dependencies.<\/p>\n<p><strong>4. Verify installation:<\/strong> To verify that both Flask and the Twilio Python SDK are installed correctly, you can create a simple Flask application that sends an SMS message using the Twilio Python SDK. Here&#8217;s an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from flask import Flask\r\nfrom twilio.rest import Client\r\n\r\napp = Flask(__name__)\r\n\r\n@app.route(\"\/\")\r\ndef send_message():\r\n    account_sid = 'YOUR_ACCOUNT_SID'\r\n    auth_token = 'YOUR_AUTH_TOKEN'\r\n    client = Client(account_sid, auth_token)\r\n\r\n    message = client.messages.create(\r\n        body='Hello from Flask and Twilio!',\r\n        from_='+1415xxxxxxx',\r\n        to='+1415xxxxxxx'\r\n    )\r\n\r\n    return 'Message sent!'\r\n\r\nif __name__ == \"__main__\":\r\n    app.run()\r\n<\/pre>\n<p>Make sure to replace YOUR_ACCOUNT_SID and YOUR_AUTH_TOKEN with your Twilio account SID and auth token, and replace the from_ and to numbers with your Twilio phone numbers.<\/p>\n<p><strong>5. Run the application:<\/strong> Save the above code as app.py and run the application by running the following command in your terminal:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">python app.py\r\n<\/pre>\n<p>Open your web browser and go to http:\/\/localhost:5000. You should see a message saying &#8220;Message sent!&#8221; and you should receive an SMS message on your phone. If you encounter any errors, double-check that Flask and the Twilio Python SDK are installed correctly and that you have entered your Twilio account SID, auth token, and phone numbers correctly.<\/p>\n<h3>Structuring your web application<\/h3>\n<p>Structuring your web application is important to keep your code organized and maintainable. Flask provides some guidelines for structuring your application, and you can follow these steps to set up your Flask environment:<\/p>\n<p><strong>1. Create a new directory for your project:<\/strong> Create a new directory for your Flask project. You can name it anything you like. For example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">mkdir myapp\r\ncd myapp\r\n<\/pre>\n<p><strong>2. Create a virtual environment:<\/strong> It&#8217;s best practice to create a virtual environment for your Flask project to keep your dependencies separate from other projects. You can create a virtual environment by running the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">python -m venv env\r\n<\/pre>\n<p><strong>3. Activate the virtual environment:<\/strong> Activate the virtual environment by running the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">source env\/bin\/activate\r\n<\/pre>\n<p><strong>4. Install Flask:<\/strong> Install Flask in your virtual environment by running the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install Flask\r\n<\/pre>\n<p><strong>5. Create a file structure for your Flask app:<\/strong> Create a new directory called app in your project folder. This directory will contain all the files for your Flask app. Inside the app directory, create the following files and directories:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">app\/\r\n\u251c\u2500\u2500 __init__.py\r\n\u251c\u2500\u2500 routes.py\r\n\u251c\u2500\u2500 templates\/\r\n\u2502   \u2514\u2500\u2500 base.html\r\n\u2514\u2500\u2500 static\/\r\n    \u2514\u2500\u2500 style.css\r\n<\/pre>\n<p><strong>6. Configure the app:<\/strong> In the __init__.py file, set up the configuration for the app. Here&#8217;s an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from flask import Flask\r\n\r\napp = Flask(__name__)\r\napp.config['SECRET_KEY'] = 'mysecretkey'\r\n\r\nfrom app import routes\r\n<\/pre>\n<p><strong>7. Define the routes:<\/strong> In the routes.py file, define the app&#8217;s routes and views. Here&#8217;s an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">from flask import render_template\r\nfrom app import app\r\n\r\n@app.route('\/')\r\ndef index():\r\n    return render_template('base.html')\r\n<\/pre>\n<p><strong>8. Create the base template:<\/strong> In the templates directory, create a new file called base.html. This file will contain the base HTML template for your app. Here&#8217;s an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;title&gt;{% block title %}{% endblock %}&lt;\/title&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"{{ url_for('static', filename='style.css') }}\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    {% block content %}{% endblock %}\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>9. Create the CSS file<\/strong>: In the static directory, create a new file called style.css. This file will contain the CSS styles for your app. Here&#8217;s an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">body {\r\n    font-family: sans-serif;\r\n    margin: 0;\r\n}\r\n<\/pre>\n<p><strong>10. Run the app:<\/strong> Run the app by running the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">export FLASK_APP=app\r\nflask run\r\n<\/pre>\n<h3>Conclusion<\/h3>\n<p>By now, you ought to be able to set up Flask, organise your web application skillfully, and use Flask to build a web page that displays a hello world message in your browser.<\/p>\n<p>You could now expand on this introduction to make web applications. Web apps built with Flask are simple to set up and use. It is one of the most widely used Python web application frameworks. Flask installation typically requires Python 2.6 or above. Python 3 (Python 3.3 and later) is supported by Flask and its dependencies, however many Flask addons do not. Thus, it is advised that Python 2.7 be used to install Flask. Python 2.7 or a later version must be present on the system in order to install flask. But, for the creation in the flask, we advise using Python 3.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most well-known Python web application frameworks is Flask. This microframework was created to be simple and quick to implement. Flask gains greater capabilities through extension with libraries and tools to support&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":114587,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27373],"tags":[27591,27592],"class_list":["post-113170","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-flask-tutorials","tag-flask-installation","tag-install-flask"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Install Flask in Easy Steps - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn to install Flask, organise web application, and use Flask to build a web page that displays a hello world message in your browser.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install Flask in Easy Steps - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn to install Flask, organise web application, and use Flask to build a web page that displays a hello world message in your browser.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-14T01:41:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-14T13:41:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/03\/flask-environment-setup.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install Flask in Easy Steps - DataFlair","description":"Learn to install Flask, organise web application, and use Flask to build a web page that displays a hello world message in your browser.","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:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/","og_locale":"en_US","og_type":"article","og_title":"Install Flask in Easy Steps - DataFlair","og_description":"Learn to install Flask, organise web application, and use Flask to build a web page that displays a hello world message in your browser.","og_url":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-07-14T01:41:08+00:00","article_modified_time":"2023-07-14T13:41:38+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/03\/flask-environment-setup.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Install Flask in Easy Steps","datePublished":"2023-07-14T01:41:08+00:00","dateModified":"2023-07-14T13:41:38+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/"},"wordCount":1531,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/03\/flask-environment-setup.webp","keywords":["Flask Installation","Install Flask"],"articleSection":["Python Flask Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/","url":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/","name":"Install Flask in Easy Steps - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/03\/flask-environment-setup.webp","datePublished":"2023-07-14T01:41:08+00:00","dateModified":"2023-07-14T13:41:38+00:00","description":"Learn to install Flask, organise web application, and use Flask to build a web page that displays a hello world message in your browser.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/03\/flask-environment-setup.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/03\/flask-environment-setup.webp","width":1200,"height":628,"caption":"flask environment setup"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/install-flask-in-easy-steps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Flask Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python-flask-tutorials\/"},{"@type":"ListItem","position":3,"name":"Install Flask in Easy Steps"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam6\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/113170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=113170"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/113170\/revisions"}],"predecessor-version":[{"id":116515,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/113170\/revisions\/116515"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/114587"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=113170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=113170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=113170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}