Best Python extensions for VS Code in 2021

Welcome to Ponicode’s selection of the top 10 most useful extensions for Python developers on VS Code. With the following tools you are going to be able to accelerate your development cycle tenfold. Ever since we started to make our VS Code extensions shortlists we have always been promoting the developer tool ecosystem to enable you to set up quickly and accelerate your workflow while preserving if not raising the quality of the features you deliver.

Discover our unique list of VS Code extension for Python in 2021.

Getting Started

2 extensions will be useful to get you started with Python development on VS Code

The Python extension from Microsoft is a must have. It will provide you rich support of the language, including features such as IntelliSense, linting, debugging, code navigation, code formatting, refactoring, variable explorer, etc. It also installs the Pylance and Jupyter extensions as a bundle so you can instantaneously work on your Jupyter Notebooks.

Python extension

https://marketplace.visualstudio.com/items?itemName=ms-python.python&ssr=false#overview

Benefits: Set up smoothly and get started with your Python project

Keywords: Python, setup, language support, Jupiter notebooks, intellisense, debugging, linter, code formatting, code navigation, refactor, variable exploration

---

And don’t forget this code runner extension.

Code runner

https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner

Benefits: Run your code instantaneously

Keywords: Python runner

Documentation

One of the perks of the VS Code marketplace for Python is the existence of some pretty neat automated docstring generation tools. Of course we are a wee bit jealous because we made our docstring generating GitHub Action last year (available here) but we are not on VS Code yet. Let’s celebrate the ecosystem of best practice documentation with these 2 extensions. 

Until we release on VS Code 😈  we recommend this docstring generator.

Autodocstring

https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring

It enables you to choose between several different types of docstring formats (Google, docBlockr, Numpy, Sphinx), infers parameter types and it supports args, kwargs, decorators, errors, and parameter types.

You can complete it with the better comments extension that will add another level of granularity for all your additional comments. You can categorize your comments between alerts, queries, TODOs, highlights and code comments. Or build your own categories.

Better comments

https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments

Benefits: Enhance collaboration, follow code best practice and make your legacy code cleaner without any effort

Keywords: docstring, comments, documentation, collaboration, code legacy


Augmented Developer

Last but not least, the augmented developer section. These are the tools that are going to augment developers to do faster with higher accuracy and consequently enable them to ship better code with velocity. At Ponicode we are obsessed with removing tedious coding tasks while improving the overall quality of every feature we ship. These extensions put you on the right track so go and explore for yourself how to improve your code journey.

We have seen numerous code autocompletion solutions appear in developer tool landscape in the past few years and the level of the AI-powered coding tools is definitely on the rise. But language specific tools can bring a smart approach to completion without too much resources, hence their availability for free on the VS Code marketplace. Hopefully this free autocomplete tool can help you move forward with your code at a higher pace.

Python Typehint

https://marketplace.visualstudio.com/items?itemName=njqdev.vscode-python-typehint

Benefits: Accelerate coding and reduce mistakes with a python specific autocomplete tool for built-in types, classes and the typing module.

Keywords: autocomplete, accelerate, autocorrect, coding, accelerated coding, python

---

Sometimes the smallest tools can be the most useful, Trailing spaces simply enables you to highlight trailing spaces and delete them in the blink of an eye. You know all those seconds lost into making quick trailing spaces removal. They piled up into hours or days of accumulated work overtime. Maybe it’s time to let the machine take over you on this side of coding. ;)

Trailing Spaces

https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces

Benefits: Save time on micro fixing tasks and remove task shifting from your code journey with trailing spaces automatic removal.

Keywords: python, coding, fixing, trailing space, space removal, beautiful code, clean code

---

If you are working on Django, one of Python’s most acclaimed frameworks then you should look up at Djaneiro. A collection of snippets for django templates, models, views, fields & forms. With over 150k installs and an outstanding 10/10 review on the VS CodeMarketplace you can sure hope that this is a top Python extension for VS Code.

Djaneiro

https://marketplace.visualstudio.com/items?itemName=thebarkman.vscode-djaneiro&ssr=false#overview

Benefits: Accelerate your code writing in Django with a full set of abbreviations to let your access pieces of code instantaneously

Keywords: snippet, accelerated code, faster writing, python, django, framework

---

Another record breaking extension, Python Test Adapter with its nearly 500,000 downloads. It comes as an alternative to Python’s Test View extension. This extension enables you to show a Test Explorer in the Test view with all detected tests and suites and their state, it includes error reporting  and it supports Unittest, Pytest and Testplan.

Python Test Adapter

https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter

Benefits: Accelerate the testing phase of your feature development.

Keywords: testing, python test, debugging, test framework

---

Correct your Python indentation in the blink of an eye. Every time you press Enter, this extension will determine exactly how much the next line should be indented and how much nearby lines should be un-indented. So simple and yet so much time savvy for us developers.

Python Indent

https://marketplace.visualstudio.com/items?itemName=KevinRose.vsc-python-indent

Benefits: Save time by avoiding to deal with indentation every new line of python code you write

Keywords: accelerated coding, accelerated developer, indent, code typing, code writing, python, productivity

---

Ponicode Unit Test

https://marketplace.visualstudio.com/items?itemName=ponicode.ponicode

Yeah we wouldn’t leave you without mentioning what we objectively celebrate as the best vs code extension in the whole world.

Our unit test generation extension helps you write unit tests and will suggest smart, context specific input suggestions and assertions to produce complete, exhaustive and robust unit test suite for all your Python projects.

Our artificial intelligence is waiting to augment your code quality journey. Give it a try

Benefits: Save time and raise your code quality by producing unit test suites for all your project quickly.

Keywords: unit test, testing, pytest, code quality, robust code, bug avoidance, regression avoidance

Any recommendations for us? Do you think that an amazing extension is missing from this list? Reach out to us on our social media!

Meanwhile: let's get coding!


Green blobred blob