Glow up! A new look for Python Reference documentation on Microsoft Learn

Today, we’re excited to announce a new, improved experience for Python library reference documentation on Microsoft Learn, formerly Microsoft Docs. The new experience is now available for all Microsoft Python libraries on Learn, such as the Azure SDK for Python. In this blog post, we take a closer look at the specific changes made and how they improve the overall experience and accessibility of Python reference documentation on Learn.

Change Summary

The key changes made to Python reference documentation on Learn were improving the navigation experience with the table of contents (TOC), the organization of in-page content, and in-page navigation via the right rail. When combined, these three key changes greatly improve the experience of finding information in Python reference on Learn.

Python in Visual Studio Code – April 2024 Release

We’re excited to announce the April 2024 release of the Python and Jupyter extensions for Visual Studio Code!

This release includes the following announcements:

  • Improved debug config flow for Flask and Django
  • Module and import analysis on Jupyter’s Run Dependent Cells with Pylance
  • Hatch environment discovery
  • Automatic environment selection for pipenv, pyenv, and Poetry projects
  • Report Issue command improvements

If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter, and Pylance extensions read more…

Retrieve User Claims in Python Flask App for Azure Container Apps After Authentication

The Token Store feature is currently supported in preview mode and can be enabled via the Azure CLI using the command az containerapp auth update with the --token-store boolean flag.

At the moment, the implementation only supports Blob Storage, which can be configured using the --sas-url-secret and --sas-url-secret-name parameters. More details on enabling the token store will be available soon in the public documentation.

However, I am going to talk about in this article that even without enabling the token store, it is still possible to retrieve user claims in the application code for Azure Container Apps after authentication, as described in this documentation: Access User Claims in Application Code. The claims are injected into the request headers, making them accessible whether from an authenticated end user or a client application.

  • X-MS-CLIENT-PRINCIPAL-NAME
  • X-MS-CLIENT-PRINCIPAL-ID
  • I would like to share a simple sample in the Python Flask app to demonstrate it read more…

How to connect Azure Key Vault from Python App Service using managed identity

In this blog, we will explore how to securely access Azure Key Vault from a Python App Service using managed identity. This method enhances security by avoiding the need to store credentials in code or configuration files. If you are interested in connecting to an Azure SQL database from a Python Function App using managed identity.

Azure Key Vault is a cloud service that provides a secure store for secrets, keys, and certificates. With managed identities for Azure resources, you can authenticate to services that support Azure AD authentication without needing credentials in your code.

Let’s dive into the steps to achieve this with a Python App Service.

Steps:

  1. Create a Python App Service in Azure: Start by creating a Python App Service from the Azure portal. Ensure that you select a runtime that supports Python and configure your app as needed.
  2. Enable Managed Identity:In the Azure portal, navigate to your App Service and enable a system-assigned managed identity. This action will create an identity in Azure AD that is tied to your App Service. 

Python in Visual Studio Code – February 2024 Release

We’re excited to announce the February 2024 release of the Python and Jupyter extensions for Visual Studio Code!

This release includes the following announcements:

  • Python debugger extension installed by default
  • Create Environment option in the Python interpreter Quick Pick
  • Jupyter’s built-in variable viewer
  • New diagnostic rules with Pylance
  • VS Code triggered breakpoints with Python

If you’re interested, you can check the full list of improvements in our changelogs for the PythonJupyter and Pylance extensions.

Python Debugger extension installed by default

The Python Debugger extension is now installed by default alongside the Python extension read more…