• Stars
    star
    2,053
  • Rank 22,507 (Top 0.5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This extension is now maintained in the Microsoft fork.

Python extension for Visual Studio Code

A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: >=3.7), including features such as IntelliSense (Pylance), linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more!

Support for vscode.dev

The Python extension does offer some support when running on vscode.dev (which includes github.dev). This includes partial IntelliSense for open files in the editor.

Installed extensions

The Python extension will automatically install the Pylance and Jupyter extensions to give you the best experience when working with Python files and Jupyter notebooks. However, Pylance is an optional dependency, meaning the Python extension will remain fully functional if it fails to be installed. You can also uninstall it at the expense of some features if youโ€™re using a different language server.

Extensions installed through the marketplace are subject to the Marketplace Terms of Use.

Quick start

Set up your environment

  • Select your Python interpreter by clicking on the status bar

  • Configure the debugger through the Debug Activity Bar

  • Configure tests by running the Configure Tests command

Jupyter Notebook quick start

The Python extension and the Jupyter extension work together to give you a great Notebook experience in VS Code.

  • Open or create a Jupyter Notebook file (.ipynb) and start coding in our Notebook Editor!

For more information you can:

Useful commands

Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:

Command Description
Python: Select Interpreter Switch between Python interpreters, versions, and environments.
Python: Start REPL Start an interactive Python REPL using the selected interpreter in the VS Code terminal.
Python: Run Python File in Terminal Runs the active Python file in the VS Code terminal. You can also run a Python file by right-clicking on the file and selecting Run Python File in Terminal.
Python: Select Linter Switch from Pylint to Flake8 or other supported linters.
Format Document Formats code using the provided formatter in the settings.json file.
Python: Configure Tests Select a test framework and configure it to display the Test Explorer.

To see all available Python commands, open the Command Palette and type Python. For Jupyter extension commands, just type Jupyter.

Feature details

Learn more about the rich features of the Python extension:

  • IntelliSense: Edit your code with auto-completion, code navigation, syntax checking and more

  • Linting: Get additional code analysis with Pylint, Flake8 and more

  • Code formatting: Format your code with black, autopep or yapf

  • Debugging: Debug your Python scripts, web apps, remote or multi-threaded processes

  • Testing: Run and debug tests through the Test Explorer with unittest or pytest.

  • Jupyter Notebooks: Create and edit Jupyter Notebooks, add and run code cells, render plots, visualize variables through the variable explorer, visualize dataframes with the data viewer, and more

  • Environments: Automatically activate and switch between virtualenv, venv, pipenv, conda and pyenv environments

  • Refactoring: Restructure your Python code with variable extraction and method extraction. Additionally, there is componentized support to enable additional refactoring, such as import sorting, through extensions including isort and Ruff.

Supported locales

The extension is available in multiple languages: de, en, es, fa, fr, it, ja, ko-kr, nl, pl, pt-br, ru, tr, zh-cn, zh-tw

Questions, issues, feature requests, and contributions

  • If you have a question about how to accomplish something with the extension, please ask on Stack Overflow
  • If you come across a problem with the extension, please file an issue
  • Contributions are always welcome! Please see our contributing guide for more details
  • Any and all feedback is appreciated and welcome!
    • If someone has already filed an issue that encompasses your feedback, please leave a ๐Ÿ‘/๐Ÿ‘Ž reaction on the issue
    • Otherwise please start a new discussion
  • If you're interested in the development of the extension, you can read about our development process

Data and telemetry

The Microsoft Python Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. This extension respects the telemetry.enableTelemetry setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.

More Repositories

1

gitHistoryVSCode

Git History for Visual Studio Code
TypeScript
918
star
2

typescript-notebook

Run JavaScript and TypeScript in node.js within VS Code notebooks with excellent support for debugging, tensorflowjs visulizations, plotly, danfojs, etc
TypeScript
803
star
3

vscodeJupyter

Jupyter for Visual Studio Code
TypeScript
335
star
4

vscode-python-manager

Python Environment & Package Manager
Python
74
star
5

vscode-python-samples

Samples for VS Code Python extension
Python
72
star
6

javaVSCode

Extension for java development on VSCode (deprecated)
TypeScript
43
star
7

jquerysnippets

jQuery Code Snippets for Visual Studio Code
TypeScript
36
star
8

python-extension-pack

Popular Visual Studio Code extensions for Python
29
star
9

git-extension-pack

Popular Visual Studio Code extensions for Git
26
star
10

vscode-jupyterpowertools

10
star
11

vscode-activate-python-extension

Always activate the python extension
JavaScript
7
star
12

listFilesVSCode

Extension to List Files in Visual Studio Code for selection
TypeScript
6
star
13

pythonVSCodeDocs

JavaScript
5
star
14

dump

TypeScript
4
star
15

vscode-jupyter

VS Code Jupyter extension
TypeScript
4
star
16

PdfManager

JavaScript
4
star
17

testJupyterDepdendency

Dockerfile
3
star
18

test

TypeScript
2
star
19

bowerVSCode

Bower Package Manager for Visual Studio Code IDE
TypeScript
2
star
20

pythonImproved

Syntax highlighting for Python using PythonImproved (https://github.com/MattDMo/PythonImproved)
2
star
21

xyz

Dockerfile
2
star
22

pyvscSmokeTesting

Python
2
star
23

testDebugPyInContainer

Dockerfile
2
star
24

vscode-setup

My Visual Studio Code setup
2
star
25

PlayCodeSpaces

2
star
26

hackJupyter2021Apr

JavaScript
2
star
27

vscode-notebook-cell-linenumber

2
star
28

pvscSmokeLS

Python
1
star
29

testingRepo

Python
1
star
30

medium

Medium Resources
1
star
31

createidsvscode

Create Unique Ids, UUID/GUID and random numbers
TypeScript
1
star
32

testVSCExt

1
star
33

blah

Python
1
star
34

shareInfo

1
star
35

vscode-extensions

Personal collection of Visual Studio Code extensions, packed together for ease of management.
1
star
36

vscode-notebook-renderer-mime

TypeScript
1
star
37

vscodePythonTesting

Python
1
star
38

VSTeamServicesExtension

Sample Visual Studio Team Services extension using TypeScript and WebPack
TypeScript
1
star
39

vscode-beeware-old

A Visual Studio Code extension with support for BeeWare development
TypeScript
1
star
40

vscode-python-uitests

Python
1
star
41

smokeTestProject

Repo used for smoke testing of Python Extension
Python
1
star
42

vscodeExtWithReact

VS Code Extension with React Code
TypeScript
1
star
43

kernel-python-picker

TypeScript
1
star
44

test1

JavaScript
1
star
45

FlaskAppExperimentalDebug

Debugging Flask apps using Experimental debugger in Python extension for VSC
Python
1
star
46

unidoc-wasm-example

Example of using unidoc in browser
HTML
1
star
47

test_gitHistory

TypeScript
1
star
48

diff-match-patch-tsd-ambient

TypeScript typings for diff-match-patch
TypeScript
1
star