Developers
July 8, 2020

Microsoft Announces Pylance, a New Python Support for VS Code

Pylance supports your Python development with features that were highly demanded by the community. It uses the Language Server Protocol to communicate with VS Code.

Microsoft announced Pylance, a language support service for Python. You can find the service in the Visual Studio Code marketplace. Pylance is dependent on the core Python extension which you need to install before it.  

Pylance is a language server that works for Python, it uses the Language Server Protocol when it communicates with VS Code. The reason for the name goes back in history to 1975, Pylance is the one who serves as a nod to Monty Python´s Lancelot, the first knight to answer the bridgekeeper´s questions in the Holy Grail.  

Pylance Is based on Microsoft´s Pyright, a static type checking tool. Pylance improves your Python IntelliSense experience by helping you write better code in a faster way. The Pylance extension comes with a collection of popular modules like auto-completion and type checking.

Two years back, in 2018, The Microsoft´s Python team released the first version of Python Language Server. From the initial release until now, the Python community provided a lot of feedback so that the Python Language server could be in the best shape possible. After receiving the feedbacks, Microsoft has been working on methods to make the language server more performant to write the best code possible.

Pylance Features

There are a couple of features that enhance the language to make it high-performance. For example Type Information, Auto-Imports, and Multi-Root Workspace Support.

Type Information

 It works by providing you the needed information so that you can correctly invoke functions and have a clean and high-quality code.

Auto Imports

By using auto-imports you can get smart import suggestions for your installed and standard library modules. This is the most requested feature by the community that Microsoft has developed.

Multi-Root Workspace Support

Pylance supports Multi-root workspaces natively. This means that you can open multiple folders in the same Visual Studio Code Session and have Pylance working in each folder.  

The new Pylance extension complements directly to the Python extension for Visual Studio Code. Once you install the Python extension, you can download Pylance from the VS Code marketplace.  

Once you have it installed, the python extension recognizes that you have Pylance and asks if you want to select it as your language server. If you are not using the python extension in VS Code, when you install Pylance it will fetch the same extension too.  

If you use Pyright in VS code, you will have to uninstall it so that Pylance works. Don´t worry, all Pyright functionality is included in Pylance. By having both extensions installed, errors and warnings will appear in your code.

Pylance steps up the game with a major improvement in the experience of Python. The team has worked for months so that the user experience in the Visual Studio Code can be as neat as possible. The new language server will be continually improved and the team will continue to listen to the customers. 

For now, you will be able to use the Python Language Server when writing Python in Visual Studio Code. The long term plan is to mover the Python Language Server users to Pylance and when this happens focus all the support on Pylance. Microsoft will gradually remove the old language server so that Pylance comes to the front page.

In conclusion, Microsoft has announced the launch of a new service to support your Python development. The service is called Pylance. You can find the Pylance extension in the Visual Studio Code Marketplace. The service counts with distinguished features such as type information, auto imports, and Multi-root workspace support. Pylance is here to replace Pyright. If you currently use Pyright, you can´t delete it without a problem as Pylance includes all Pyright´s functionalities. As a good practice, startups and companies listen to their customers. Microsoft has worked on features that were asked by the community, and they declare they will continue to do so to improve the next generation of Pylance.

TagsPylanceMicrosoftPythonVisual Studio Code
Lucas Bonder
Technical Writer
Lucas is an Entrepreneur, Web Developer, and Article Writer about Technology.

Related Articles

Back
DevelopersJuly 8, 2020
Microsoft Announces Pylance, a New Python Support for VS Code
Pylance supports your Python development with features that were highly demanded by the community. It uses the Language Server Protocol to communicate with VS Code.

Microsoft announced Pylance, a language support service for Python. You can find the service in the Visual Studio Code marketplace. Pylance is dependent on the core Python extension which you need to install before it.  

Pylance is a language server that works for Python, it uses the Language Server Protocol when it communicates with VS Code. The reason for the name goes back in history to 1975, Pylance is the one who serves as a nod to Monty Python´s Lancelot, the first knight to answer the bridgekeeper´s questions in the Holy Grail.  

Pylance Is based on Microsoft´s Pyright, a static type checking tool. Pylance improves your Python IntelliSense experience by helping you write better code in a faster way. The Pylance extension comes with a collection of popular modules like auto-completion and type checking.

Two years back, in 2018, The Microsoft´s Python team released the first version of Python Language Server. From the initial release until now, the Python community provided a lot of feedback so that the Python Language server could be in the best shape possible. After receiving the feedbacks, Microsoft has been working on methods to make the language server more performant to write the best code possible.

Pylance Features

There are a couple of features that enhance the language to make it high-performance. For example Type Information, Auto-Imports, and Multi-Root Workspace Support.

Type Information

 It works by providing you the needed information so that you can correctly invoke functions and have a clean and high-quality code.

Auto Imports

By using auto-imports you can get smart import suggestions for your installed and standard library modules. This is the most requested feature by the community that Microsoft has developed.

Multi-Root Workspace Support

Pylance supports Multi-root workspaces natively. This means that you can open multiple folders in the same Visual Studio Code Session and have Pylance working in each folder.  

The new Pylance extension complements directly to the Python extension for Visual Studio Code. Once you install the Python extension, you can download Pylance from the VS Code marketplace.  

Once you have it installed, the python extension recognizes that you have Pylance and asks if you want to select it as your language server. If you are not using the python extension in VS Code, when you install Pylance it will fetch the same extension too.  

If you use Pyright in VS code, you will have to uninstall it so that Pylance works. Don´t worry, all Pyright functionality is included in Pylance. By having both extensions installed, errors and warnings will appear in your code.

Pylance steps up the game with a major improvement in the experience of Python. The team has worked for months so that the user experience in the Visual Studio Code can be as neat as possible. The new language server will be continually improved and the team will continue to listen to the customers. 

For now, you will be able to use the Python Language Server when writing Python in Visual Studio Code. The long term plan is to mover the Python Language Server users to Pylance and when this happens focus all the support on Pylance. Microsoft will gradually remove the old language server so that Pylance comes to the front page.

In conclusion, Microsoft has announced the launch of a new service to support your Python development. The service is called Pylance. You can find the Pylance extension in the Visual Studio Code Marketplace. The service counts with distinguished features such as type information, auto imports, and Multi-root workspace support. Pylance is here to replace Pyright. If you currently use Pyright, you can´t delete it without a problem as Pylance includes all Pyright´s functionalities. As a good practice, startups and companies listen to their customers. Microsoft has worked on features that were asked by the community, and they declare they will continue to do so to improve the next generation of Pylance.

Pylance
Microsoft
Python
Visual Studio Code
About the author
Lucas Bonder -Technical Writer
Lucas is an Entrepreneur, Web Developer, and Article Writer about Technology.

Related Articles