News

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

Featured

Subscribe on YouTube