Тёмный

Flask installation and setup in Visual Studio Code | Flask in VS Code Tutorial Part #1 

Cool IT Help
Подписаться 23 тыс.
Просмотров 21 тыс.
50% 1

In this tutorial, we will learn how to install flask and set up a development environment for Flask in Visual Studio Code.
1) Flask is a lightweight python framework for web applications with basic support for URL routing and page rendering.
2) Also known as 'micro framework' because it does not directly provide the following features like validation, database abstraction, authentication, and so on. We can use these features with help of a special python package which is called Flask Extension.
3) Flask does not provide a template engine, but installing Flask includes the 'Jinja templating engine by default.
Prerequisites
=============
1) Install the Python extension (by Microsoft) in Visual Studio Code.
2) Install a version of Python 3
3) On Windows, make sure the location of your Python interpreter is included in your PATH environment variable.
Create a project environment for the Flask
===========================================
Important Note :
================ we need to create a virtual environment in which we will install Flask, Using a virtual environment avoids installing Flask into a global Python environment and gives you exact control over the libraries used in an application.
let's do it together,
Step 1: Create a folder and open it in visual studio code.
Step 2: open a new terminal in VS code and run this command to create a virtual environment: py -3 -m venv .venv
Step 3: now run following command to activate virtual environment : .venv\scripts\activate
Step 4: now go to --view -- command palette -- type Select Python Interpreter, from the list --select the virtual environment in your project folder that starts with ./.venv or .\.venv:
Step 5: Open a new terminal that will activate the newly created virtual environment, then
Step 6: run the following command in the terminal:
python -m pip install --upgrade pip
Step 7: Install Flask in the virtual environment-run following command -
python -m pip install flask
Now we have a self-contained environment ready for writing Flask code.
** To know you are working in a created virtual environment just check the environment is activated when the command prompt shows (.venv) at the beginning.
*Please watch the Flask Tutorial part - 2 to create and run a sample app in visual studio code.
• Creating and running d...
#FlaskSetupVSCode #coolithelp #flaskTutorialBeginners

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@Rishu_Dakshin
@Rishu_Dakshin 11 месяцев назад
Thanks a lot for the video. This is what a beginer like me looking for. After 1 complete day of checking other videos, i finally found it and made it, Please made videos on - how to build Flast restful API please
@wendymcdonald7351
@wendymcdonald7351 Год назад
Thank you for this, new to using VS and flask. This helped so much!
@beerauppamnaveenteja720
@beerauppamnaveenteja720 Год назад
I am nodeJS based developer. Recently i thought to try flask too, but while doing step3, it showing error like bash: .venvscriptsactivate: command not found. Can you please help me regarding this?
@roshnikumari6614
@roshnikumari6614 6 месяцев назад
same doubt ! is your problem resolved.. if yes please share
@gutsjoestar7450
@gutsjoestar7450 Год назад
if it isnt on my path, how do i add it to it 4:10
@rroc001t1200b
@rroc001t1200b Год назад
wow, after much distress and frustration trying to get my flask to work. I finally found exactly what I was looking for. my flask app works!!!. Thank you for this great tutorial for both Part 1 and Part 2
@CoolITHelp
@CoolITHelp Год назад
Glad I could help!
@Tranhaidang3301
@Tranhaidang3301 Год назад
it good but i must change setting scripts to enable on my system
@reniguntlabharadwaj9122
@reniguntlabharadwaj9122 Год назад
Same problem
@SirMika9
@SirMika9 Год назад
It don't work. Step 3 it tell me script execution is deactivated in the system
@adithyaraghavan9968
@adithyaraghavan9968 Год назад
Yes same for me
@anandratna3828
@anandratna3828 Год назад
Th🎉anks
@sriya4090
@sriya4090 Год назад
Thanks
@naman_sharma2511
@naman_sharma2511 Год назад
Very helpful
Далее
Getting Started with Flask (using VS Code)
12:52
Просмотров 43 тыс.
Самая сложная маска…
00:32
Просмотров 1,2 млн
Китайка и Максим Крипер😂😆
00:21
+1000 Aura For This Save! 🥵
00:19
Просмотров 9 млн
How to Create a Web Application in Python using Flask
52:52
How to Set up VS Code for Data Science & AI
22:53
Просмотров 311 тыс.
The Complete Guide to Python Virtual Environments!
15:52
Самая сложная маска…
00:32
Просмотров 1,2 млн