Learn more about PyCharm in our dedicated tutorial: PyCharm for Productive Python Development (Guide)
Overview & Use Cases
00:00 Hello everyone to this section about PyCharm. We’ve talked about a couple of text editors, and in this section, I want to talk about a full blown IDE—so, an integrated development environment—and PyCharm is a great example for that.
00:33 There’s this one shortcut that I’ll talk to you about right away, which is this Search Everywhere, Shift + Shift. When I press Shift + Shift, it opens up this search box that allows me to search through the whole project structure. PyCharm thinks of your project as a project, which means it can contain a lot, a lot of different files and folders, and it just has an understanding of this whole level of everything that’s going on in there. That’s what makes it so powerful. So when I go for a search here, I’m going to start off, for example, if I search for “theme”
01:07 on here, you can see it gives me a couple of options and among others, there’s this Preferences > Appearance, so I can go in here. And you see, PyCharm already highlights for me what did I search for. I searched for “theme” here, so I get these highlights, and here I can change it to something else.
But that’s just an example of how you can use this Search Everywhere to access preferences, but you can also access files. So I can say, “Okay, I’m going to search for
urls.py” and it offers me there’s two files called
projects folder, one in
portfolio folder. Okay, so I choose which one do I want, press Enter, and right away I’m in that file.
So navigation becomes very quick and easy. I can even navigate to a certain variable, so if I say “DATABASE”, for example, I get the option to jump right to that declaration of
settings.py. It takes me directly there, you see?
02:09 So this Search Everywhere feature, it’s very, very powerful. So that’s something if you get started with PyCharm, just remember Shift + Shift and then you can get to a lot of places and learn more about it. Okay, what else makes it a useful development environment?
02:24 So as the name IDE says—integrated development environment—we have a couple of things here that come with the editor already, that are not part of others. So we have, for example, a terminal included that I can open up by just pressing here.
And one thing you can notice on this side is that I have a virtual environment already activated. When you create a new PyCharm project, by default it also makes a virtual environment for you, so you don’t have to deal with that, which is a great thing, actually. So here,
pip freeze, I can see I already have
Django installed because it’s a project I worked on before.
03:00 But I did not manually activate the virtual environment—I didn’t even have to manually create it. This is just something that PyCharm does for you. So it helps to keep your development environment clean and your computer settings separate from other projects. Another place where I can look for that—Shift + Shift again—I can go in there and I can say “Look at the project settings,” so I just the type the name.
But in here, you can do anything that you could do in a console. I’m going to just show you quickly, I can import
random and then I say dot (
.) and it gives me autocompletion, right? So
04:43 And if you forget about what it can do, you can press Command + P and it shows you stuff. What can you put in there? Don’t worry if you’re not remembering all this stuff that I’m saying here. I just want to give you a quick overview that there’s lots and lots of powerful features in PyCharm, and we’ll talk about some important ones in just a bit. All right. So here’s the console. Yeah, run whatever you want to run in a console.
05:06 We have very powerful debugging features. And yeah, I’ll just mention that very shortly, because we’ll go into it a bit more in a separate video. But if you want to go in here, you can just simply create a breakpoint—
05:21 there it is. You can quickly create a breakpoint by just clicking here into the edge next to the numbers. And yeah, this creates a breakpoint. You can run the debugger by pressing this bug symbol up here.
05:44 So, what also makes PyCharm integrated and very useful compared to other editors is that it understands a lot of different languages—for example, HTML—and it has this project-level understanding.
05:57 So here, I’m referencing a template file, and PyCharm gives me this option to simply by a click access that template file. So I can just hop over there, and here I’m inside of some Django templating language.
It understands HTML, so the HTML is properly formatted. The Django templating language is properly formatted. There’s shortcuts. I can just say
for and press Tab and it autocompletes for me a very common structure.
06:31 So, it just can make development very quick. And the good thing is that it doesn’t only understand Python, but without needing to do anything, it already understands a lot of other languages as well. That goes as far as that—in the professional version—you have the database explorer.
You can do crazy stuff, like let’s say for
projects_project let’s make a diagram. Show Visualization… and this is maybe a boring one, but if you have a bigger database, you can see all the connections and you can see it in a very easily-digestible format. So that’s a bunch of cool stuff that you can do with PyCharm and that gives you the powers when you’re actually using such a big program as this one is. It does take a lot more of your memory space, so you’re going to need a bit more RAM if you want to actually work with something like that as compared to VIM or VS Code.
07:37 But if you’re working on a big project that includes a lot of files, such as web development often does—if you’re working on a web app that has a database, that has tons of different files, a templating language, a backend language, front end language, and all these different parts—then having a powerful tool such as PyCharm that has this project-level understanding and understanding of all the different languages and lots of useful shortcuts and features can be very, very helpful.
08:02 Now, there’s a lot to learn and you’re not going to understand everything right away—I don’t by now—but it’s just a step-by-step process and I promise you, you can become very, very effective working with a good tool such as PyCharm. Okay.
Become a Member to join the conversation.