Eve: Building RESTful APIs with MongoDB and Flask Transcripts
Chapter: Setup and tools
Lecture: VSCode editor

Login or purchase this course to watch this video and the rest of the course contents.
0:01 We are going to write some code in this course so we need some kind of code editor, right? Well, when it comes to coding,
0:09 a Python developer is left with a number of options. Now, I won't get into the text editor versus IDE debate, not today, at least.
0:18 Personally, I happen to work on different platforms and languages so depending on the task at hand, you can find me doing Python on Vim
0:24 or C# in Visual Studio when I am on Windows. So yes, I'm using minimal text editors as well as IDEs, Vim is so wound up in my muscle memory
0:33 that even when I am on Visual Studio I still use Vim key bindings. Lately, I also had been doing both C# and Python,
0:41 and Javascript to be honest, on Visual Studio code. For this course, I am going to use Code.
0:47 It is a fantastic, open source editor widely adopted by the Python community. It runs on MacOS, on Windows and on Linux.
0:56 It is free, very stable and also actively maintained. I find it to be the perfect compromise between a pure text editor like Vim,
1:05 and a full blown IDE like Visual Studio or PyCharm. Of course, you're free to use your preferred editor or IDE,
1:12 but if you want to follow me as I type my code, you may want to download and install Code. You never know, you might end up liking it a lot.
1:20 Getting Code is simple, you just have to go to code.visualstudio.com and hit this big download button here where you can pick your preferred version.
1:32 As I mentioned already, you can get it on the Mac, on Windows or on Linux, just make sure that on Linux, you get the correct version,
1:40 depending on your distribution. You can also click on this button here in the upper right corner you will get basically the same links and options.
1:48 Once Code is on the system we want to get it ready for Python. So let's activate the virtual environment that we created
1:57 when we installed Eve in a previous lecture. Source, and here we are, as you can see, our virtual environment is active now
2:12 let's pip freeze so we know which packages are installed, yes, Eve is there, ready to go.
2:22 Now, we need a folder where we want to work and write our Python scripts, so let's create it, and then let's move into it, right,
2:37 now, we can launch our editor we'll use a dot to instruct Code that we want to work on this very folder where we are sitting right now.
2:50 And here we go, as you can see, Code is ready for us, and it is already on our folder, as we can see here. Before we can start coding in Python,
3:01 we need to install the proper installation. So let's go over here, to the extension tab and click on it.
3:07 As you can see, we get a nice list of available extensions, for Code. Yes, there are a lot of them, actually,
3:14 they are probably are in the order of the hundreds, if not thousands, you name a language, a stack or a framework
3:20 you probably will find two, three, five extensions for it. It is really a huge number and what's even more interesting is
3:28 that they are sorted by number of installs, and as you can see, the top one is Python, let's click on it.
3:35 On the right pane, we get a lot of information about the extension, quick start, link to the documentation etc, but, look at the download number here,
3:44 at the time of this recording, we are at almost 6 million downloads, it's a huge number I believe and it tells a lot about the adoption rate
3:53 of Code by the Python community. And next, look at the release, this is actually a Microsoft release, so it is an official extension
4:03 and there is a little story here because actually the guy who started working on this project started it as a community project on github,
4:11 then, as the adoption kept growing Microsoft reached out to this guy and they ended up hiring him, so now he is a Microsoft employee
4:20 and the extension itself is an official extension by Microsoft. Now, this is interesting for a few reasons,
4:26 but I find it is important because it tells a lot about the commitment of Microsoft into open source, Python and Code.
4:34 So let's install the extension, click on this start button here, it will take a while, and done.
4:41 Once the extension is installed, you need to reload it, and here we go, Python is now installed and we are ready to go.


Talk Python's Mastodon Michael Kennedy's Mastodon