Azure Functions Now Supports Python

Azure Functions, Microsoft's take on cloud-hosted, serverless, event-driven computing, now officially supports the Python programming language.

The general availability of Python support follows a preview in which it has already been adopted by companies such as General Electric Aviation and TCF Bank.

Like AWS Lambda in the Amazon cloud and Google Cloud Functions in the Google Cloud Platform, Azure Functions lets developers provide code that gets executed -- typically in response to events or bindings -- without the need to provision or manage servers, which is done automatically.

Microsoft has been busy bolstering the functionality of Azure Functions, having added Java support and improving TypeScript support in February. Now that Python support has been added, Azure Functions covers two of the perennially most popular programming languages.

"You can now develop Python 3.6 apps to run on the cross-platform, open source Functions 2.0 runtime," said Daria Grigoriu of the Azure Functions team in an Aug. 19 blog post. "These can be published as code or Docker containers to a Linux-based serverless hosting platform in Azure."

Triggers and Bindings with Python in Azure Functions
[Click on image for larger view.] Triggers and Bindings with Python in Azure Functions (source: Microsoft).

Grigoriu said Python is especially suited for many workloads leveraging the serverless model, especially pertaining to data science/machine learning and automated resource management.

Examples of such workloads for each include:

  • Simplified data science pipelines:
    • Use Azure Functions to deploy a trained ML model along with a scoring script to create an inferencing application.
    • Leverage triggers and data bindings to ingest, move prepare, transform, and process data using Functions.
    • Use Functions to introduce event-driven triggers to re-training and model update pipelines when new datasets become available.
  • Automated resource management:
    • Process Azure Monitor alerts generated by Azure services.
    • React to Azure events captured by Azure Event Grid and apply operational requirements on resources.
    • Leverage Azure Logic Apps to connect to external systems like IT service management, DevOps, or monitoring systems while processing the payload with a Python function.
    • Perform scheduled operational tasks on virtual machines, SQL Server, web apps, and other Azure resources.

Developers can use Azure Functions Core Tools with the IDE or text editor of choice, while an Azure Functions extension for Visual Studio Code provides a tightly integrated editing experience within Microsoft's popular, cross-platform, open source code editor, Grigoriu said.

More resources for interested developers include:

Developers can sign up for a free Azure account here.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube