7 essential VS Code extensions for Python developers in 2021

Python

VS Code supports code highlighting for Python without this extension. However, if you will be working with Python, you should install this extension. It is developed by Microsoft itself, the same creator of VS Code. It’s so essential for Python developers’ productivity that VS Code will automatically suggest that you install it right after opening your first.pyfile.

[Read:Meet the 4 scale-ups using data to save the planet]

But why do I need it if I already have syntax highlighting? This extension is a powerhouse of functionality when it comes to working with Python. It provides functionalities like:

Look at it in action:

Download Python

Python Snippets

Python Snippetsis an extension full of in-built snippets packs developed by Ferhat Yalçın. This extension is great for any developer but especially for beginners in Python. It contains numerous in-built snippets such as string, list, sets, tuple, dictionary, class, and much more. Another advantage of using this plugin is that it also provides at least one example of each snippet, making it awesome while learning Python.

Download Python Snippets

Python Docstring Generator

We already talked about the importance of documentation and how much I love documenting the code, but we all know it can be a frustrating task.Python Docstring Generatordiminishes the endeavor of developers by auto-creating docstrings.

The best thing about this extension is that it follows all standard formats of docstring (including Google, docBlockr, Numpy, Sphinx, and PEP0257 is coming soon), and that is cool. Moreover, this docstring generator supports args, kwargs, decorators, errors, and parameter types with multiline commenting features.

Just see it in action and be amazed:

Download Python Docstring Generator

Python Test Explorer for Visual Studio Code

ThePython Test Explorerextension allows you to run your Python unittest or Pytest tests with the Test Explorer UI. This small and handy tool will enable you to test your code from VS Code’s comfort with an excellent user interface and debugging capabilities.

We know the importance of unit testing so having a tool like this on your IDE or code editor is a must-have.

Download Python Test Explorer

Python Preview

Python Previewis an extension that adds visual debugging to your Python code. It transforms debugging code into an interactive session with animations and graphic elements to represent your application status. You just have to see it:

Download Python Preview

Python Type Hint

Yes, Python has something like Types, and yes, it is awesome. Think ofType Hintsfor Python as TypeScript is for JavaScript. It’s a game-changer that I hope we start seeing more often in tutorials and applications.Python Type Hintprovides type hint completion items for built-in types, estimated types, and the typing module. Moreover, it can search for Python files in the workspace for type estimation purposes.

Download Python Type Hint

Jupyter

Jupyter is one of my favorite VS Code extensions. Yes, it is what you are thinking. It’s Jupyter Notebooks directly in VS Code. As someone who’s always working with Jupyter Notebooks, this extension was beneficial, and I believe there’s still a lot I have to explore about it.

Integration with Jupyter Notebooks is one of my favorite features of PyCharm, though to be fair, I love the PyCharm integration more than I do the VS Code integration. With that said, Jupyter for VS Code is for free, while PyCharm Jupyter Notebook integration is only available in the pro version.

Download Jupyter

Conclusion

As I mentioned in the JS version of this post, VS Code positively surprised me. It’s a solid tool for coding fast, flexible, and with expanding features through extensions.

Interestingly, all these extensions I listed here today are some of my favorite features in PyCharm, but free of cost and with a fantastic user experience.

Still, details about the editor bug me, and so, my editor of choice is PyCharm. However, with quality extensions like this, I see how it can get hard to justify paying for it.

Thisarticlewas originally published onLive Code StreambyJuan Cruz Martinez(twitter:@bajcmartinez), founder and publisher of Live Code Stream, entrepreneur, developer, author, speaker, and doer of things.

Live Code Streamis also available as a free weekly newsletter. Sign up for updates on everything related to programming, AI, and computer science in general.

Story byLive Code Stream