HOLIDAY SALE! Save 50% on Membership with code HOLIDAY50. Save 15% on Mentorship with code HOLIDAY15.

4) Flask Installation & Setup Lesson

Setup Your Editor: VS Code

3 min to complete · By Brandon Gigous

What's free, open-source, and super useful? Give up? It's a good ol' free Integrated Development Environment (IDE)! IDEs give you a place to type your code into and try executing. In this lesson you'll learn about VS Code, how to install it, and helpful Flask VS Code extensions.

Why use VS Code?

In this Python + Flask course, you will be working with the lightweight VS Code IDE. Advantages of VS Code include:

  • Free and open-source
  • Extensions (also free) that make web development easier (e.g. syntax highlighting for Django templates etc.)
  • Broad community support
  • Integrated debugging and seamless use of your terminal

If you have a different favorite code editor, feel free to use it instead. This course will use VS Code throughout, so it will be easier to follow along if you choose the same editor. VS Code has rightfully gained a lot of positive attention and is a useful tool to know.

Install VS Code

To get up and running, please follow CodingNomads' VS Code installation guide, then return here.

VS Code extensions

Once you have your text editor installed and set up, install the following extensions to aid in your Flask web app development quest:

  • Jinja - Jinja template language support for Visual Studio Code
  • Jinja2 Snippet Kit - Jinja2 snippets for cool attractive people to use in your HTML templates.
  • Python - Linting, Debugging (multi-threaded, remote), Intellisense, Jupyter Notebooks, code formatting, refactoring, unit tests, snippets, and more.
  • Trailing Spaces - Highlight trailing spaces and delete them in a flash!
  • AutoTrim - Automatically trims trailing whitespace when moving the cursor from one line to another

There's also a file auto save feature in VSCode's settings. To toggle it, head to File -> Preferences -> Settings... and search for "Files: Auto Save". For normal users who want to save their files manually every once in a while, then this feature is not recommended.

Now that you've got your code editor set up, it's time to download the lab used in this course!