Top 10 VS Code Extensions for Python

Top 10 VS Code Extensions for Python

If you are a programmer who uses VS Code as your code editor for Python, VS Code will suggest some general extensions to make it easy for you to program in Python. Apart from these, there many other noteworthy extensions available in the VS Code Marketplace to make python programming easy and fun.

In my Best VS Code Extensions for Developers article, I shared some of the more general purpose extensions that I recommend to use as a developer. In today's article, I'll be sharing my list of favourite VS Code extensions for Python programming. So without further ado, let's dive in.

1. Python Extension for VS Code

This a feature-rich extension for the Python Programming Language that includes features such as IntelliSense (Pylance), linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more. This extension is usually suggested or automatically installed by VS Code when you have a .py file open.

python-demo-1.gif

Python Extension for VS Code Demo

python-demo-2.gif

Python Extension for VS Code Demo 2

2. Python Preview

Python Preview is an extension that adds visual debugging of Python language in VS Code. It is very simple to use and makes writing python code so much easier since it helps you visualize what you're trying to build.

python preview.gif

Python Preview Demo

3. Python Snippets

This a very simple yet very productive extension that provides almost all kinds of snippets when programming with python. Since it gives you examples for each and every piece of code snippet, you can also learn the things that you might not already know, from this extension.

python-snippets.gif

Python Snippets Demo

4. Kite

Kite is an AI-powered programming assistant that helps you write code faster inside Visual Studio Code. Kite helps you write code faster by saving you keystrokes and showing you the right information at the right time.

Kite works for all major programming languages, including Python.

kite-demo.gif

Kite Demo

5. AREPL

AREPL is an extension that automatically evaluates python code in real-time. As you start to code, AREPL will constantly run and check your code in real-time. This is especially useful as it points out errors as you are typing.

arepldemo.gif

AREPL Demo

6. autoDocString - Python DocString Generator

A VS Code extension that generates clear and concise documentation for your methods, classes and functions. It provides multiple docstring formats including: Google, Sphinx, Numpy, docBlockr, One-line-sphinx and pep257 and has support for args, kwargs, decorators, errors, and parameter types.

autodocstring-demo.gif

autoDocString Demo

7. Python Indent

Indentation plays an important role in the Python programming language, and if you mess an indentation, your code might not work. This can be really frustrating ☹. VS Code supports some functionality and has improved it over time, but there times where you press enter and the cursor goes to far-left of the editor. This is where Python Indent comes into play. This extension provides a basic functionality, which is indenting our code without needing to check the cursor position every time we press enter. I would really recommend you check out this extension.

python-indent.gif

Python Indent Demo

8. Better Comments

The Better Comments extension will help you create more human-friendly comments in your code. With this extension, you will be able to categorize your annotations into:

  • Alerts
  • Queries
  • TODOs
  • Highlights
  • Commented out code can also be styled to make it clear the code shouldn't be there
  • Any other comment styles you'd like can be specified in the settings

better-comments.webp

Better Comments Demo

9. Jupyter

An extension that allows you to code, run and analyze Jupyter Notebooks in VS Code. You can use all the goodies that you love in VS Code to edit Jupyter Notebooks.

jupyter-demo.gif

Jupyter Demo

10. Python Test Explorer

This extension allows you to run your Python Unittest, Pytest or Testplan tests with the Test Explorer UI. In python, unit testing plays a key role when writing good code, so a tool like this is a must-have for your IDE.

python-test-adatapter.png

Python Test Explorer Demo

Conclusion

Well that's it, this has been my Top 10 VS Code Extensions for Python, remember this is only my recommendation, there tons more on the Visual Studio Marketplace.

If you found this article useful, I wrote an article sharing my Best VS Code Extensions for Developers, where I include some 'general purpose extensions', so check that out too.🤩