Visual Studio Code for Python Developers Transcripts
Chapter: Managing Environments
Lecture: Environments Wrapup
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
All right, folks. Well, that brings us to the end of chapter five of this course.
0:04
And what we did was spend a little bit of time talking about some of the different tools and
0:08
techniques that you could use inside of Visual Studio Code for managing your Python development
0:12
environment. Now, before we move on to the next chapter, why don't we spend a couple of minutes
0:16
and talk about some of the things that we've covered so far. Now, first thing that we did
0:20
was we talked about an open source command line tool called PyM or pyenv. And this is great if
0:26
you need to swap between different versions of Python on your machine. And maybe you have one
0:31
project that uses one version of Python and another one that uses another. This is a really
0:35
good tool to help automate doing some of that type of stuff. Now, the next thing we talked about is
0:40
the support inside of VS Code for switching between different Python interpreters. So after
0:45
we have our different versions of Python installed, we can also, using the VS Code UI, swap between
0:50
those different versions in there. Also, we have the option of selecting different virtual
0:55
environments too. And that's a really cool tool. So let's get started.
0:56
VS Code has some conventions that it follows to try and discover where these different
1:01
interpreters are installed. Now, the next thing we looked at was one of my favorite tools is
1:06
Poetry. And no, not writing Poetry, but this is also another open source command line tool.
1:11
And this helps us with package management, managing our dependencies. It also spins up
1:16
virtual environments for us. So it's kind of like a little bit of an all-in-one environment
1:21
management tool. So this is pretty fun. If you like Poetry, this is obviously very optional. You don't have to
1:26
use it. But if you like it, make sure you head over to the docs and check it out.
1:30
Another thing that we talked about using is ENV files, and particularly how we could use them
1:36
to help manage our environment variable settings. Now, environment variables are just key value
1:41
pairs that, you know, might hold information from our application, whether it's connection strings
1:46
or API keys or anything of the sort. It's a great source for keeping our configuration safe and also
1:51
out of source control as well. Now, in the next chapter, we're going to be talking about
1:56
source control. And specifically, we're going to be talking about how we could do source control in VS Code. We're going to focus on using Git.