Flask Hello World: Setting up a python virtual environment (venv) in VS Code & installing Flask

preview_player
Показать описание
In this video we work in Visual Studio Code that already has the basic Python Extensions. We run python -m venv venv to establish a virtual environment. Next, we made sure the the current user had the appropriate script running permissions in PowerShell (this was a Windows system). Then we activated the virtual environment and ran the command pip install Flask. After that we created a .py file in the virtual environment and added the basic "Hello World" code to have Flask act as a virtual web server and serve up a very simple page. We invoked the flask app from the command line (terminal) and accessed the resulting page.
Рекомендации по теме
Комментарии
Автор

thank you so much! I have been struggling with this

dgfuhen
Автор

can you make a video explaining what goes inside the include folder. and also when making .gitignore file what folders and files should someone hide?

BlissAden
Автор

While I know it works, should project files be placed in the virtual environment folder (venv in this case)? Isn't this folder more of a throwaway folder that can be rebuilt at any time (and reload requirements from a requirements.txt file). Putting project files in it seems to clutter what would be part of the distribution files and development files.

randyfriend
Автор

i am getting error message stating this : Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

pruthvichowdary
welcome to shbcf.ru