Every developer has their go-to tools, and for me, VS Code is the undisputed champion when it comes to Python. But it’s not just the editor itself that makes the difference; it’s the carefully curated collection of extensions that turns a good coding environment into a great one. I have experimented with many, and in this post, I’m eager to share the extensions that I use every single day to make coding in Python seamless, intuitive, and more fun.

6 GitHub Copilot

Your AI companion

GitHub Copilot has become a crucial part of my Python development toolkit in VS Code. It enhances my coding speed, helps me learn, keeps me in productive flow, and ensures a smoother and more enjoyable development process.

As I start typing a function name, a class definition, or even just a comment describing what I want to achieve, Copilot often displays accurate and complete code snippets instantly. And mind you, this isn’t just basic auto-completion; Copilot understands the context of my project, the libraries I’m using, and even the natural language comments I write.

I have found it useful when setting up common patterns like FASTAPI routes, or even a complex list of comprehensions. The integrated Copilot Chat feature is also a powerhouse. I can highlight a block of my Python code and ask Copilot to explain this function.

There is even an option to change Copilot models or add new premium ones right from the Chat menu.

5 Ruff

Lightning-fast feedback

If you are a Python developer using VS Code, you have likely heard the buzz around, and for good reason. Written in Rust, Ruff is a fast Python linter and code formatter.

The biggest reason I love Ruff is speed. With traditional linters like Flake8 or Pylint, especially on larger projects, I would sometimes experience a noticeable delay before issues were highlighted in VS Code. Ruff eliminates that.

I can catch errors, style violations, and potential bugs as I’m writing them. It keeps me in the flow and reduces the time spent on code quality checks. Other features include consistent code formatting (Black-compatible), automated fixes, and a comprehensive rule set.

4 Jupyter

Unlock Jupyter notebooks in VS Code

As the name suggests, the Jupyter extension integrates the power of Jupyter Notebooks directly into my familiar VS Code environment. For those unfamiliar, Jupyter Notebooks are web-based interactive tools that enable you to combine executable code (such as Python), rich text, and visualizations on a single canvas.

You can essentially create, open, and work with .ipynb files without having to switch to a separate browser tab. Before this extension, I would often have VS Code open for my .py scripts and then a separate browser window for my Jupyter Notebooks. Now, I can edit my Python scripts and work on my notebooks side by side in the same editor.

Other features include integrated debugging, rich visualizations, and seamless integration with VS Code’s ecosystem (like IntelliSense, Git Integration, Themes, and more).

3 Better Comments

Create human-friendly comments in your code

While Better Comments isn’t Python-specific, its impact on my Python development is huge. As the name suggests, this extension allows you to color-code different types of annotations within your comment and make them stand out.

My codebase often has sections that need attention, explanation, or warnings. Instead of writing comments with plain text, I can use keywords like TODO, FIXME, or NOTE, and they immediately stand out.

For instance, TODO comments turn orange and instantly signal tasks I need to revisit. I no longer miss small follow-up items. Similarly, FIXME comments become red and give a stark warning about something broken. This visual tweak enables me to quickly scan my Python files.

2 Excalidraw

Visualize complex Python logic

You might be surprised to see a drawing tool in a list of Python development extensions, but for me, the Excalidraw extension for VS Code has been valuable at times.

When I’m dealing with complex algorithms or a multi-step process, the Python code can sometimes be hard to understand just by reading lines of text. I often find myself wanting to draw it out, and Excalidraw is perfect for this.

I can quickly sketch flowcharts to map out the sequence of operations in a function or an entire script, state diagrams for understanding how my objects change state in a complex system, data flows, and more. It’s a free, open-source virtual whiteboard tool that is packed with features and annotation tools.

And just like Jupyter extension, one of the biggest benefits of Excalidraw in VS Code is avoiding context switching.

1 Python Indent

Better than the default indentation behavior

Indentation is a fundamental part of Python’s syntax. If you mess it up, your code won’t run. While VS Code has built-in indentation features, the Python Indent extension takes it to another level.

It intelligently handles various scenarios where standard auto-indentation might fall short, ensuring that your code maintains consistent indentation as you type or paste.

The extension recognizes Python keywords such as 'if', 'else', 'for', 'while', 'class', and others, and ensures that the next line is indented properly when I press Enter. It’s one of the ‘set it and forget it’ extensions that quietly runs in the background and does the job in style.

Code faster, code smarter

Ultimately, the best development environment is the one that works for you. While I have shared the VS Code extensions that work for my Python workflow, the beauty of VS Code lies in its vast customizability. I highly recommend starting with my suggestions and experimenting with new extensions, tweaking settings, and refining your setup.

VS Code’s versatility doesn’t end with Python development only. You can even use these extensions to turn it into an ideal writing app.

Visual Studio Code