The post Python in Visual Studio Code – November 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>This release includes the following announcements:
If you’re interested, you can check the full list of improvements in our changelogs for the Python and Pylance extensions.
You can now add your AI-generated documentation directly into your code as a docstring using the new Add as docstring command in Copilot Hover Summaries. When you generate a summary for a function or class, navigate to the symbol definition and hover over it to access the Add as docstring command, which inserts the summary below your cursor formatted as a proper docstring.
This streamlines the process of documenting your code, allowing you to quickly enhance readability and maintainability without retyping.

GitHub Copilot Hover Summaries inside Pylance now respect your display language within VS Code. When you invoke an AI-generated summary, you’ll get strings in the language you’ve set for your editor, making it easier to understand the generated documentation.

Wildcard imports (from module import *) are often discouraged in Python because they can clutter your namespace and make it unclear where names come from, reducing code clarity and maintainability.
Pylance now helps you clean up modules that still rely on from module import * via a new Code Action. It replaces the wildcard with the explicit symbols, preserving aliases and keeping the import to a single statement. To try it out, you can click on the line with the wildcard import and press Ctrl + . (or Cmd + . on macOS) to select the Convert to explicit imports Code Action.

The Python Debugger extension now leverages the APIs from the Python Environments Extension (vscode-python-debugger#849). When enabled, the debugger can recognize and use different interpreters for each project within a workspace. If you have multiple folders configured as projects—each with its own interpreter – the debugger will now respect these selections and use the interpreter shown in the status bar when debugging.
To enable this functionality, set “python.useEnvironmentsExtension”: true in your user settings. The new API integration is only active when this setting is turned on.
Please report any issues you encounter to the Python Debugger repository.
We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include:
We would also like to extend special thanks to this month’s contributors:
Try out these new improvements by downloading the Python extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.
The post Python in Visual Studio Code – November 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>The post Python in Visual Studio Code – October 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>This release includes the following announcements:
If you’re interested, you can check the full list of improvements in our changelogs for the Python and Pylance extensions.
The Python Environments extension received several fixes and updates to enhance your Python development experience in VS Code. Highlights include improved performance and reliability when working with conda environments – now lauching code directly without conda run, a smoother environment flow with Python versions now sorted in descending order for easier acces to the latest releases, fixes for crashes when running Python files that use input(), and improvements to false-positive environment configuration warnings.
The extension also now automatically refreshes environment managers when expanding tree nodes, keeping your environment list up to date without any extra steps.
We appreciate the community feedback that helped identify and prioritize these improvements. Please continue to share your thoughts, suggestions and bug reports on the Python Environments GitHub repository as we continue rolling out this extension.
We’ve improved the testing experience by adding a “Copy Test ID” option to the gutter icon context menu for test functions. This feature allows you to quickly copy test identifiers in pytest format directly from the editor gutter, making it easier to run specific tests from the command line or share test references with teammates.
We have made improvements to shell start up to reduce issues where terminals created by GitHub Copilot weren’t properly activating Python virtual environments. With the new shell startup approach, you’ll get a more reliable environment activation across terminal creation methods while reducing redundant permission prompts.
Additionally, virtual environment prompts such as (.venv) now appear correctly when PowerShell is activated through shell integration, and we have resolved issues with activation in WSL.
To benefit from these improvements, set your python-envs.terminal.autoActivationType to shellStartup in your VS Code settings.
We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python and Jupyter Notebooks in Visual Studio Code. Some notable changes include:
We would also like to extend special thanks to this month’s contributors:
Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.
The post Python in Visual Studio Code – October 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>The post Simplifying Resource Management in mssql-python through Context Manager appeared first on Microsoft for Python Developers Blog.
]]>
Reviewed by: Sumit Sarabhai and Gaurav Sharma
If you’ve worked with databases in Python, you know the boilerplate: open a connection, create a cursor, run queries, commit or rollback transactions, close cursors and connection. Forgetting just one cleanup step can lead to resource leaks (open connections) or even inconsistent data. That’s where context managers step in.
We’ve introduced context manager support in mssql‑python driver, enabling Python applications to interact with SQL Server and Azure SQL more safely, cleanly, and in a truly Pythonic way.
Try it here
You can install driver using pip install mssql-pythonCalling all Python + SQL developers! We invite the community to try out mssql-python and help us shape the future of high-performance SQL Server connectivity in Python.!
Why Context Managers?
In Python, the with statement is syntactic sugar for resource management. It actively sets up resources when you enter a block and automatically cleans them up when you exit — even if an exception is raised.
Think of it as hiring a helper:
The Problem: Managing Connections and Cursors
Earlier, working with Python applications and SQL server/Azure SQL looked something like this:
from mssql_python import connect
conn = connect(connection_string)
cursor = conn.cursor()
try:
cursor.execute("SELECT * FROM users")
for row in cursor:
print(row)
finally:
cursor.close()
conn.close()
This works perfectly fine. But imagine if your code had multiple cursors, multiple queries, and exception handling sprinkled all over. Closing every connection and cursor manually becomes tedious and error-prone. Miss a close() somewhere, and you have a resource leak.
That’s where Python’s with statement — the context manager — comes to the rescue. mssql_python not only supports it for connections but also for cursors, which makes resource management nearly effortless.
Using Context Managers with Connections
Now comes the real magic — connection-level context managers. When you wrap a connection in a with block, several things happen under the hood:
Example:
from mssql_python import connect
with connect(connection_string) as conn:
cursor = conn.cursor()
cursor.execute("INSERT INTO users (name) VALUES ('Alice')")
# If no exception → commit happens automatically
# If exception → rollback happens automatically
# Connection is closed automatically here
Equivalent traditional approach:
conn = connect(connection_string)
try:
cursor = conn.cursor()
cursor.execute("INSERT INTO users (name) VALUES ('Alice')")
if not conn.autocommit:
conn.commit()
except:
if not conn.autocommit:
conn.rollback()
raise
finally:
conn.close()
How It Works Internally
autocommit=False, transactions are committed.autocommit=False, uncommitted changes are rolled back. The exception propagates unless handled.Use case: Perfect for transactional code — inserts, updates, deletes — where you want automatic commit/rollback.
Using Context Managers with Cursors
Cursors in mssql_python now support the with statement. The context here is tied to the cursor resource, not the transaction.
with conn.cursor() as cursor:
cursor.execute("SELECT * FROM users")
for row in cursor:
print(row)
# Cursor is automatically closed here
What happens here?
cursor.close() manually.autocommit=False, changes are committed or rolled back at the connection level.autocommit=True, each statement is committed immediately as it executes.Above code is equivalent to the traditional try-finally approach:
cursor = conn.cursor()
try:
cursor.execute("SELECT * FROM users")
for row in cursor:
print(row)
finally:
cursor.close()
Use case: Best for read-only queries where you don’t want to worry about cursor leaks.
Important
If you just want to ensure the cursor closes properly without worrying about transactions, this is the simplest and safest approach.Image 1: Workflow of Context Manager in Connections and Cursor
Practical Examples
Example 1: Safe SELECT Queries
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("SELECT * FROM users WHERE age > 25")
for row in cursor:
print(row)
# Cursor closed, connection still open until block ends
# Connection is closed
Example 2: Multiple Operations in One Transaction
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("INSERT INTO users (name) VALUES ('Bob')")
cursor.execute("UPDATE users SET age = age + 1 WHERE name = 'Alice'")
# Everything committed automatically if no exception
Example 3: Handling Exceptions Automatically
try:
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("INSERT INTO users (name) VALUES ('Charlie')")
# Simulate error
raise ValueError("Oops, something went wrong")
except ValueError as e:
print("Transaction rolled back due to:", e)
# Connection closed automatically, rollback executed
Real-Life Scenarios
Example 1: Web Applications
In a web app where each request inserts or fetches data:
def add_user(name):
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("INSERT INTO users (name) VALUES (?)", (name,))
Example 2: Data Migration / ETL
Migrating data between tables:
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("INSERT INTO archive_users SELECT * FROM users WHERE inactive=1")
cursor.execute("DELETE FROM users WHERE inactive=1")
Example 3: Automated Reporting
Running multiple queries for analytics:
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("SELECT COUNT(*) FROM users")
user_count = cursor.fetchone()[0]
cursor.execute("SELECT department, COUNT(*) FROM employees GROUP BY department")
for row in cursor:
print(row)
Example 4: Financial Transactions
Simple bank transfer example:
def transfer_funds(from_account, to_account, amount):
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("UPDATE accounts SET balance = balance - ? WHERE id=?", (amount, from_account))
cursor.execute("UPDATE accounts SET balance = balance + ? WHERE id=?", (amount, to_account))
Example 5: Ad-Hoc Data Exploration
When exploring data in scripts or notebooks:
with connect(connection_string) as conn:
with conn.cursor() as cursor:
cursor.execute("SELECT AVG(salary) FROM employees")
print("Average salary:", cursor.fetchone()[0])
close() calls.
Takeaway
Python’s philosophy is “simple is better than complex.” With context managers in mssql_python, we’ve brought that simplicity to SQL Server interactions with python apps making lives of the developers easier.
Next time you’re working with mssql_python, try wrapping your connections and cursors with with. You’ll write less code, make fewer mistakes, and your future self will thank you. Whether it’s a high-traffic web application, an ETL script, or exploratory analysis, context managers simplify life, make code safer, and reduce errors.
Remember, context manager will help you with:
Try It and Share Your Feedback!
We invite you to:
Use Python Driver with Free Azure SQL Database
You can use the Python Driver with the free version of Azure SQL Database!
Deploy Azure SQL Database for free
Deploy Azure SQL Managed Instance for free Perfect for testing, development, or learning scenarios without incurring costs.
The post Simplifying Resource Management in mssql-python through Context Manager appeared first on Microsoft for Python Developers Blog.
]]>The post Python in Visual Studio Code – September 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>This release includes the following announcements:
If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.
This month you can also help shape the future of Python typing by filling out the 2025 Python Type System and Tooling Survey: https://jb.gg/d7dqty
A new experimental AI Hover Summaries feature is now available for Python files when using the pre-release version of Pylance with GitHub Copilot. When you enable the setting(python.analysis.aiHoverSummaries) setting, you can get helpful summaries on the fly for symbols that do not already have documentation. This makes it easier to understand unfamiliar code and boosts productivity as you explore Python projects. At the moment, AI Hover Summaries are currently available to GitHub Copilot Pro, Pro+, and Enterprise users.
We look forward to bringing this experimental experience to the stable version soon!
The Pylance Run Code Snippets tool is a powerful feature designed to streamline your Python experience with GitHub Copilot. Instead of relying on terminal commands like python -c "code" or creating temporary files to be executed, this tool allows GitHub Copilot to execute Python snippets entirely in memory. It automatically uses the correct Python interpreter configured for your workspace, and it eliminates common issues with shell escaping and quoting that sometimes arise during terminal execution.
One of the standout benefits is the clean, well-formatted output it provides, with both stdout and stderr interleaved for clarity. This makes it ideal when using Agent mode with GitHub Copilot to test small blocks of code, run quick scripts, validate Python expressions, or checking imports, all within the context of your workspace.
To try it out, make sure you’re using the latest pre-release version of Pylance. Then, you can select the pylancerunCodeSnippet tool via the Add context… menu in the VS Code Chat panel.
Note: As with all AI-generated code, please make sure to inspect the generated code before allowing this tool to be executed. Reviewing the logic and intent of the code ensures it aligns with your project’s goals and maintains safety and correctness.
We appreciate your feedback and are excited to share several enhancements to the Python Environments extension. Thank you to everyone who submitted bug reports and suggestions to help us improve!
We focused on removing friction and unexpected behavior when working with Conda environments:
conda run wrapperPipenv environments are now discovered and listed in the Environments Manager view.
We’ve made it easier to identify and resolve environment-related issues. When there are issues with the default environment manager, such as missing executables, clear warnings are now surfaced to guide you through resolution.
Additionally, there’s a new Run Python Environment Tool (PET) in Terminal command which gives you direct access to running the back-end environment tooling by hand. This tool simplifies troubleshooting by allowing you to manually trigger detection operations, making it easier to diagnose and fix edge cases in environment setup.
We also reduced paper cuts to make your experience with the extension smoother. These include:
python.useEnvFile which controls whether environment variables from .env files and the python.envFile setting are injected into terminals when the Python Environments extension is enabled.python.venvFolders setting in favour of a new one in the future, to enable better flexibility when setting up environment search paths.We are continuing to roll-out the extension. To use it, make sure the extension is installed and add the following to your VS Code settings.json file: "python.useEnvironmentsExtension": true. If you are experiencing issues with the extension, please report issues in our repo, and you can disable the extension by setting "python.useEnvironmentsExtension": false in your settings.json file.
This month, the Python community is coming together to gather insights on how type annotations are used in Python. Whether you’re a seasoned user or have never used types at all, your input is valuable! Take a few minutes to help shape the future of Python typing by participating in the 2025 Python Type System and Tooling Survey: https://jb.gg/d7dqty.
We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python and Jupyter Notebooks in Visual Studio Code. Some notable changes include:
python.analysis.supportAllPythonDocuments setting has been removed, making Pylance IntelliSense now enabled in all Python documents by default, including diff views and Python terminals.We would also like to extend special thanks to this month’s contributors:
os.__file__ is available before using it in debugpy#1944Try out the new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.
The post Python in Visual Studio Code – September 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>The post Announcing the Data Wrangler powered Notebook Results Table appeared first on Microsoft for Python Developers Blog.
]]>Check out how Data Wrangler integrates seamlessly with notebooks in VS Code to enable you to answer these questions quickly and easily, with just a few clicks.
The new experience seamlessly replaces the static HTML output for Pandas DataFrames, only where applicable, and without any additional actions. Just make sure the Data Wrangler extension is installed 
There is no need to write code for sorting and filtering. You can just click around the interactive UI as you explore the data.
You can instantly know if a column contains missing (blank) values or repeating values you did not expect just by glancing at the column header.
Access summaries, statistics, histograms, frequency, and more, all instantly and without leaving the context of your notebook cell.
With just one click you can jump into the full Data Wrangler experience for even more data cleaning operations and Copilot powered data cleaning. Going back to the notebook view is just one click away.
Export your data as CSV or Parquet files for further analysis or to feed it into a pipeline.
To try out this experience today, make sure you have the free Data Wrangler extension for VS Code installed. Then, run any Pandas DataFrame in your Jupyter notebook inside VS Code, and watch as Data Wrangler immediately enhances the output with powerful, interactive features (running a cell with just your DataFrame df is enough to get started).
As we iterate to make Data Wrangler the best data exploration and preparation tool, we want to hear from you! If you have any feedback about this experience, please let us know in our GitHub repository.
Elevate your data science workflow and enjoy a more intuitive way to work with your data today!
The post Announcing the Data Wrangler powered Notebook Results Table appeared first on Microsoft for Python Developers Blog.
]]>The post mssql-python vs pyodbc: Benchmarking SQL Server Performance appeared first on Microsoft for Python Developers Blog.
]]>Reviewed by Imran Masud and Sumit Sarabhai
When it comes to working with Microsoft SQL Server in Python, pyodbc has long been the de facto driver. It’s mature, trusted and has been serving the community well for years.
But as applications scale and Python becomes more central to modern data workflows — from microservices to data engineering and platforms like Microsoft Fabric — there’s a growing need to modernize and improve the developer experience.
So, can we take this further?
Meet mssql-python – a modern SQL Server driver for Python that rethinks the architecture from the ground up while preserving a familiar experience for developers. It is purpose-built for:
Calling all Python + SQL developers! We invite the community to try out mssql-python and help us shape the future of high-performance SQL Server connectivity in Python.!
To evaluate how it stacks up against pyodbc, we ran a comprehensive suite of performance benchmarks using the excellent Richbench tool. The results? Let’s just say they speak volumes.
Most Python SQL Server drivers, including pyodbc, route calls through the Driver Manager, which has slightly different implementations across Windows, macOS, and Linux. This results in inconsistent behavior and capabilities across platforms. Additionally, the Driver Manager must be installed separately, creating friction for both new developers and when deploying applications to servers.
With mssql-python, we made a bold decision. At the heart of the driver is DDBC (Direct Database Connectivity) — a lightweight, high-performance C++ layer that replaces the platform’s Driver Manager.
Key Advantages:
By owning the layer that the ODBC driver depends on, DDBC delivers:
This architecture gives mssql-python its core advantages – speed, control and simplicity.
To expose the DDBC engine to Python, mssql-python uses PyBind11 – a modern C++ binding library, instead of ctypes. Why is that important?
With ctypes, every call between Python and the ODBC driver involved costly type conversions, manual pointer management, and is slow and unsafe.
PyBind11 solves all of this. It provides:
Benchmark Script
If you want to reproduce or extend our tests, checkout the complete script on GitHub.mssql-python outperforms pyodbc across most operations:
|
Category
|
mssql-python vs. pyodbc |
| Core SQL (SELECT, INSERT, UPDATE, DELETE) | 2× to 4× faster |
| Join, Nested, and Complex Queries | 3.6× to 4× faster |
| Fetch Operations (One & Many) | 3.6 to ~3.7× faster |
| Stored Procedures, Transactions | ~2.1× to ~2.6× faster |
| Batch Inserts | ~8.6x faster |
| 1000 Connections | 16.5x faster |
Across the board, the mssql-python driver demonstrated significantly faster execution times for common SQL operations, especially on:
These results indicate highly efficient execution paths, minimal overhead, and strong connection reuse capabilities.
Disclaimer on Performance Benchmarks
The performance tests comparing mssql-python and pyodbc were conducted using a controlled set of queries designed to evaluate core driver capabilities. Real-world results may vary based on query patterns, data volumes, and system configurations.We welcome feedback and real-world usage insights from the community. If you encounter performance issues or have suggestions, please raise issues on Github, we’re actively listening and committed to improving the experience.
We captured this benchmark data in a clean tabular format using richbench tool. Here’s a quick glance at the relative performance:
We’re actively improving the driver and here’s what’s in the pipeline:
Performance tuning is a key priority, and we’re committed to delivering consistent improvements in upcoming releases.
If you’re building high-performance apps with SQL Server in Python, mssql-python is a fast, modern and compelling alternative to pyodbc. It is:
Join the Early Customer Program
If you’re interested in becoming an early dogfooder and showcase your journey at Microsoft Ignite – we’d love to hear from you!Apply here to join the Early Customer Program.
Get early access, influence the roadmap, and work directly with the team!
We invite you to:
Use Python Driver with Free Azure SQL Database
You can use the Python Driver with the free version of Azure SQL Database!
Deploy Azure SQL Database for free
Deploy Azure SQL Managed Instance for free Perfect for testing, development, or learning scenarios without incurring costs.
The post mssql-python vs pyodbc: Benchmarking SQL Server Performance appeared first on Microsoft for Python Developers Blog.
]]>The post Python in Visual Studio Code – August 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>This release includes the following announcements:
If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.
The Python Environments extension continued to receive bug fixes and improvements as part of the controlled roll-out currently available to 20% of Stable users. To use the Python Environments extension during the roll-out, make sure the extension is installed and add the following to your VS Code settings.json file: "python.useEnvironmentsExtension": true. If you are experiencing issues with the extension, please report issues in our repo, and you can disable the extension by setting "python.useEnvironmentsExtension": false in your settings.json file.
As the Python environment manager ecosystem is evolving with new environment managers, new capabilities to existing environment managers, we want to make it easier for the community to get these newer features. This extension provides an API surface for extensions to integrate with the existing features of the Python Extension, this was asked for by the community that wanted to build newer features for their favorite environment managers.
This also helps us in a few ways:
With that in mind, we ask each community to leverage our API interface to build tailored support for their tool of choice. Our team is committed to help enable and integrate these extensions, but we recognize we are not experts in each tool and cannot provide the best support for each. There are a number of published or work-in-progress extensions:
| Env Manage | Link | Status |
pixi |
https://github.com/renan-r-santos/pixi-code | Published |
uv |
https://github.com/InSyncWithFoo/uv-for-vscode | In-development |
hatch |
https://github.com/flying-sheep/vscode-hatch | In-development |
We now support shell integration for Python when using version 3.13 or later. This enhancement brings rich terminal features to Python REPLs, including better command detection, output parsing, and integration with VS Code’s terminal capabilities. When shell integration is enabled, PyREPL is automatically disabled to ensure compatibility and provide the best experience.
You can control this behavior through the Python shell integration setting, python.terminal.shellIntegration.enabled, in your VS Code settings.
Terminal suggestions powered by language servers now include inline documentation, similar to what you see in the editor. Starting with the Python REPL, you’ll get helpful descriptions and usage details for commands as you type, making it easier to discover and use Python functions and methods directly in the terminal.
To enable this feature, you’ll need these settings:
"python.terminal.shellIntegration.enabled": true"python.analysis.supportAllPythonDocuments": trueWe plan to enable these settings by default in future releases as we continue to refine the experience.
We now support installing required dependencies when you run Jupyter Notebooks against a virtual environment created using uv. This enhancement makes it seamless to work with uv-managed environments in your Jupyter workflows, automatically handling package installation when needed.
We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python and Jupyter Notebooks in Visual Studio Code. Some notable changes include:
__file__ variable to globals in exec() in vscode-python#25225Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.
The post Python in Visual Studio Code – August 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>The post Announcing Full Cross-Platform Support for the mssql-python Driver appeared first on Microsoft for Python Developers Blog.
]]>
After the successful release of Public Preview of mssql-python driver, we’re thrilled to announce a major milestone for the mssql-python driver: full support for all three major operating systems—Windows, macOS, and Linux. This release marks a significant leap forward in our mission to provide seamless, performant, and Pythonic connectivity to Microsoft SQL Server and the Azure SQL family.
Try it here: mssql-python
With this release, Linux support is officially live, completing our cross-platform vision. Whether you’re developing on Ubuntu, Red Hat or Debian, the mssql-python driver now offers native compatibility and a streamlined installation experience. This was made possible through deep integration work and iterative testing across distros.
Note:
We’ve also rolled out Connection Pooling support across Windows, macOS, and Linux. This feature dramatically improves performance and scalability by reusing active database connections. It’s enabled by default and has already shown significant gains in internal benchmarks.
Important:
Our latest performance benchmark results show mssql-python outperforming pyodbc by up to 2.2× across core SQL operations, fetch patterns, and connection pooling—stay tuned for a deep dive into the numbers and what’s driving this performance leap in our upcoming blogs!EntraID authentication is now fully supported on MacOS and Linux but with certain limitations as mentioned in the table:
| Authentication Method | macOS/Linux Support | Notes |
| ActiveDirectoryPassword | Yes |
Username/password-based authentication |
| ActiveDirectoryInteractive | No |
Only works on Windows |
| ActiveDirectoryMSI (Managed Identity) | Yes |
For Azure VMs/containers with managed identity |
| ActiveDirectoryServicePrincipal | Yes |
Use client ID and secret or certificate |
| ActiveDirectoryIntegrated | No |
Only works on Windows (requires Kerberos/SSPI) |
Note:
ActiveDirectoryInteractive for Linux and MacOS will be supported in future releases of the driver. Please stay tuned!Behind the scenes, we’ve unified the mssql-python driver’s codebase across platforms. This includes hardened DDBC bindings using smart pointers for better memory safety and maintainability. It will become easier for the community members to help us grow this driver. These efforts ensure that the driver behaves consistently across environments and is easier to maintain and extend.
All three platforms now support Python versions starting from 3.10, ensuring backward compatibility and broader adoption. Whether you’re running legacy scripts or modern workloads, the driver is ready to support your stack.
Thanks to our recent work on packaging and dependency management, installing the mssql-python driver is now simpler than ever. Users can get started with a single pip install command—no admin privileges, no pre-installed driver manager is required.
Windows and Linux: mssql-python can be installed with pip:
pip install mssql-python
MacOS: For MacOS, the user must install openssl before mssql-python can be installed with pip:
brew install openssl
pip install mssql-python
| Audience | How They Benefit | Scenario |
|---|---|---|
| Python Developers | Seamless setup and consistent behavior across Windows, macOS, and Linux | A developer working on a cross-platform data ingestion tool can now use the same driver codebase without OS-specific tweaks. |
| Data Engineers & Analysts | Connection pooling and EntraID support improve performance and security | A data engineer running ETL jobs on Azure VMs can authenticate using managed identity and benefit from faster connection reuse. |
| Open Source Contributors | Unified codebase makes it easier to contribute and maintain | A contributor can now submit a patch without worrying about platform-specific regressions. |
| Enterprise Teams | Backward compatibility and secure authentication options | A team migrating legacy Python 3.10 scripts to Azure SQL can do so without rewriting authentication logic. |
| PyODBC Users | Frictionless migration path to a modern, actively maintained driver | A team using PyODBC can switch to mssql-python with minimal changes and gain performance, security, and cross-platform benefits. |
| Impact Area | Why It Matters | Real-World Value |
|---|---|---|
| Cross-Platform Development | Eliminates OS-specific workarounds | Teams can standardize their SQL connectivity stack across dev, test, and prod environments. |
| Enterprise Readiness | EntraID support and connection pooling are built-in | Organizations can deploy secure, scalable apps with minimal configuration. |
| Community Growth | Easier onboarding and contribution pathways | New contributors can quickly understand and extend the driver, accelerating innovation. |
| Performance & Scalability | Connection reuse reduces latency and resource usage | Apps with high query volumes see measurable performance improvements. |
| Migration Enablement | Supports drop-in replacement for PyODBC and other drivers | Developers can modernize their stack without rewriting business logic. |
Here’s a sneak peek at what we’re working on for upcoming releases:
Ready to test the latest features? We invite you to:
Use Python Driver with Free Azure SQL Database
You can use the Python Driver with the free version of Azure SQL Database!
Deploy Azure SQL Database for free
Deploy Azure SQL Managed Instance for free
Perfect for testing, development, or learning scenarios without incurring costs.
We look forward to your feedback and collaboration!
The post Announcing Full Cross-Platform Support for the mssql-python Driver appeared first on Microsoft for Python Developers Blog.
]]>The post Python in Visual Studio Code – July 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>This release includes the following announcements:
If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.
We’ve begun the roll-out of the Python Environments extension as an optional dependency with the Python extension. What this means is that you might now begin to see the Python Environments extension automatically installed alongside the Python extension, similar to the Python Debugger and Pylance extensions. You can find its features by clicking the Python icon that appears in the Activity Bar. This controlled roll-out allows us to gather early feedback and ensure reliability before general availability.
The Python Environments extension includes all the core capabilities we’ve introduced so far including: one-click environment setup using Quick Create, automatic terminal activation (via "python-envs.terminal.autoActivationType" setting), and all supported UI for environment and package management.
To use the Python Environments extension during the roll-out, make sure the extension is installed and add the following to your VS Code settings.json file:
"python.useEnvironmentsExtension": true
We have disabled PyREPL for Python 3.13 and above to address indentation and cursor issues in the interactive terminal. For more details, see Disable PyREPL for >= 3.13.
We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python and Jupyter Notebooks in Visual Studio Code. Some notable changes include:
.venv folders generating by the Python Environments extension are now git-ignored by default (vscode-python-environments#552).Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.
The post Python in Visual Studio Code – July 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>The post Python in Visual Studio Code – June 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>This release includes the following announcements:
If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.
The Python extension now includes the following chat tools: “Get information for a Python Environment”, “Get executable information for a Python Environment”, “Install Python Package” and “Configure Python Environment”. You can either directly reference them in your prompt by adding #getPythonEnvironmentInfo and #installPythonPackage, or agent mode will automatically call the tool as applicable based on your prompt. These tools seamlessly detect appropriate environment information, based on file or workspace context, and handle package installation with accurate environment resolution.
The “Configure Python Environment” tool ensures that the Python environment is set up correctly for the workspace. This includes creating a virtual environment if needed, and selecting it as the active Python environment for your workspace.
Tools that were previously introduced in the Python Environments extension (preview) have been migrated to the Python extension, thereby making these tools available to all users with the Python extension installed.
Language server completions are now available in the terminal for interactive Python REPL sessions. This brings the same language completions you receive in the editor, now inside the terminal making terminal interactions more efficient.
To try it out, ensure the following settings are enabled:
setting(terminal.integrated.shellIntegration.enabled:true)setting(python.terminal.shellIntegration.enabled:true)setting(terminal.integrated.suggest.enabled:true)setting(python.analysis.supportAllPythonDocuments:true)The Python Environments extension (preview) now supports project creation for Python packages and basic scripts, allowing you to bypass scaffolding and get coding more quickly. Use the Python Envs: Create Project from Template command in the Command Palette to select whether you want to create a package or a script and let the command handle the rest!
For package creation, you can expect to name the package, create a virtual environment, and receive a scaffolded project which includes a tests subfolder, pyproject.toml, dev-requirements.txt, and boilerplate __main__.py and __init__.py files.
For scripts, a new Python file with the name of your choice and boilerplate code will be created.
We added support for pyenv for environment management, and poetry for both package and environment management in the Python Environments extension. This ensures you can manage pyenv and poetry environments as your normally would in the support UI contributed by the Python Environments extension. When pyenv or poetry are installed on your machine, they will appear as support environment managers in the Python panel accessed in the Activity Bar.
We’re starting to roll-out the Python Environments extension as an optional dependency with the Python extension beginning with a subset of pre-release users this month. What this means is you may now begin seeing the Python Environments extension automatically installed along side the Python extension, similar to the Python Debugger and Pylance extensions. This controlled rollout allows us to gather early feedback and ensure reliability before general availability. The Python Environments extension includes all the core capabilities we’ve introduced so far including: Quick Create for one-click environment setup using Quick Create, automatic terminal activation (via "python-envs.terminal.autoActivationType" setting), and all supported UI for environment an package management.
You can install the preview version of the Python Environments extension from the Extension Marketplace if you would like to try it out. Please let us know if there are any issues or feature requests via our vscode-python-environments repo.
shortTitle to execSelectionInTerminal command in vscode-python#25007TypeError from trying to read directory in vscode-python-debugger#692Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.
The post Python in Visual Studio Code – June 2025 Release appeared first on Microsoft for Python Developers Blog.
]]>