In today's article I will be talking about few of the best extension for VS Code for Python. So, let's get started!
Also, I wanted to update you guys on my Python package
py-everything. The documentation is now complete. v1.2.0 was released just Yesterday! and it now comes with a CLI tool, setupPyGen. As the name it is a tool that generates setup.py and a python package project structure for you. So go check it out here. And the documentation here
We all know it, probably have it too. It's the most basic extension for Python and also the most crucial one. I won't talk about this much, since almost everyone has this.
Pylance is language server for Python which is very feature-rich and performant. I have been using it for the past few months and it has been improving every day along with my code. Also, it open-source.
TabNine is an AI Autocomplete engine, which is just awesome, you can have your model run locally or on the cloud. They also have a paid premium version but I am using the free one. Which is still awesome. I used to use Kite AI Autocomplete but does not provide AI autocomplete in the free version so I moved to Tabnine. I still use the Kite co-pilot.
This is a very useful extension, especially when you are debugging or trying to debug your code. It shows line by line, what is going to happen at execution and what could possibly go wrong. It also lists what variable is of what type and it's data at any given line at the time of execution. This has helped me. And I find it really useful.
This extension is helpful when you are running unit tests on a file using the unittest module or pytest. It provides a nice little UI for that. Other than that it doesn't have much use for me.
Python Indent is pretty good extension. It corrects the indentation in your python code. Which helps really. Since when you have like an if statement inside of a loop which is inside of a if statement which is inside another if statement which is inside a loop, is really hard to figure out the indentation right?
NOTE: Spaces and Tabs are equivalent. Do not start a battle with spaces and tabs in the comments please!!!!!
This is a very simple extension, yet effective. It colors the different indentation with different colors. Imagine the above scenario. This extension would color 4 spaces(or equivalent tabs) as yellow, 8 spaces(or equivalent tabs) as green, 12 spaces(or equivalent tabs) as blue and so on, so on! Basically, this extension makes indentation much easier to read.
Sometimes, we might miss those little red streaks under our code, and get a error. Error Lens highlights lines which have a error, warning or info and displays that error or warning or info beside the code itself. And we are sure to never miss that right?
Wrote a new variable in CONSTANT case variable, but actually should have been camelCase? No worries, this extension go you covered. Just select the variable, press
P, and type change and press Enter, select camel case and boom it is now camelCase. Great, Huh?
This is mostly useful if you are using Django, I don;t use Django much(don't like python back-end that much). This extension gives you a lot of snippets and has a good syntax.
These extensions aren't directly for Python, but for use with combined Python and something else!
You probably already have this extension and there is not much to say about it, the name kind of explains itself! It adds a ton of more functionality for use with Git and GitHub! From comparisons to diffs and much more!
Prettier is a very popular extension that pretty-fies your file on save. Nothing much to say either!
This is a pretty useful extension, this makes brackets much more readable and better looking.
Have you ever found yourself going through 100s of file just to find that one function or variable? Then, this extension is your savior! Just bookmark that function and go it anytime you want! Isn't that cool?
This extension adds Jupyter Notebook support, interactive programming and computing with IntelliSense and debugging, and more!
Hope you enjoyed this article! And be sure to subscribe to the newsletter to get notified when I post a new article! Anyways, thanks for reading and see you next time!