Loading...

Azure Functions using Python: 2023 in Review

Azure Functions using Python: 2023 in Review

The Azure Functions team is thrilled to share the key investments made in 2023 to enhance the Python experience! This year has been a big one for Python, with a highlight being a new programming model release that enables customers to use decorators and embrace a simpler structure. This release is part of a Functions-wide initiative to improve the development experience across all languages.

 

Releases in 2023

 

Generally Available: V2 Programming Model for Python 

The v2 model is designed to provide a functions development experience that is more familiar to Python developers. Our hope with the release of this feature is to greatly enhance the getting started experience and usability with Functions using Python.

 

Following is an example of a Function Application with an HTTP trigger using both the v1 and the v2 programming models:

 

File Name v1 v2
init.py import azure.functions def main(req: azure.functions.HttpRequest) -> str: user = req.params.get('user') return f'Hello, {user}!'  
function.json { "scriptFile": "__init__.py", "bindings": [ { "authLevel": "function", "type": "httpTrigger", "direction": "in", "name": "req", "methods": [ "get", "post" ] }, { "type": "http", "direction": "out", "name": "$return" } ] }  
function_app.py   import azure.functions app = func.FunctionApp() @app.function_name(name="HttpTrigger1") @app.route(route="req") def main(req: azure.functions.HttpRequest) -> str: user = req.params.get('user') return f'Hello, {user}!'


Note that using the v1 programming model, there would be an 'init.py' and 'function.json' file for each function within the function application. When using the v2 programming model, all functions can be defined within the 'function_app.py' file. This significantly decreases the number of files and simplifies the folder structure, making it easier to manage applications. To learn more, see V2 Python Programming Model is Generally Available. Let us know your thoughts about this new programming model here.

 

 

Generally Available: Support for Python 3.11 

Support for Python 3.11 was released in September 2023! This enables usage of new features released in Python 3.11 to be leveraged when developing Azure Functions.

 

Performance Improvements

We made key changes on how we load our modules during specialization, and this work has resulted in a 33% decrease in our cold start times. This improvement will green light new scenarios as well as enhance the existing experience when it comes to performance.

 

Generally Available: Apple Silicon Mac Support for Python versions 3.8+

Customers can now use Core Tools natively on Apple Silicon Macs. Enabling development on Apple Silicon Macs eliminates the need for customers on machines like the M1 Mac to emulate an x86 environment on their machine. 

 

What's next?

In the upcoming months, we will be working on supporting Python 3.12, making improvements to the triggers and bindings experience, adding new features to the v2 programming model, and more!

 

If you haven’t already tried Azure Functions using Python, get started today!

Are you interested in leveraging Open AI using serverless? Check out this sample of a personalized, intelligent chatbot that draws its knowledge directly from an individual's email interactions. Using Azure Functions and Open AI, the bot allows one to get quick answers to inquiries about their inbox.

 

Questions or comments? Create an issue in the Azure Functions Python repository. 

 

Thank you so much for your support this year - we appreciate and value our community greatly, and are grateful for your support, feedback, and trust. If you'd like to provide feedback for the product, please submit the Azure Functions Python Survey by following the link and clicking 'New Discussion'. We look forward to delivering new features and product improvements in 2024.

 

Published on:

Learn more
Azure Compute Blog articles
Azure Compute Blog articles

Azure Compute Blog articles

Share post:

Related posts

Upcoming Changes to Instance Size Flexibility Ratios for Reserved VM Instances for M-series: What Yo

Overview In the ever-evolving landscape of cloud computing, it is crucial to stay informed about changes that may affect your usage and busine...

1 year ago

Exploring SUSE Enterprise Linux on Azure

Exploring SUSE Enterprise Linux on Azure In today's cloud-centric world, leveraging robust and reliable operating systems is crucial for busin...

1 year ago

Announcing Public Preview of new attach/detach disks API for VMs/VMSS

We are excited to announce the public preview of a new API that will make attaching and detaching disks to a VM faster and easier. The new API...

1 year ago

Fine-tuning a Hugging Face Diffusion Model on CycleCloud Workspace for Slurm

Introduction Azure CycleCloud Workspace for Slurm (CCWS) is a new Infrastructure as a Service (IaaS) solution which allows the users to purpos...

1 year ago

Public Preview Announcement-On Demand Capacity Reservation in Azure in China

Today, we're announcing the public preview of on demand capacity reservations for Azure Virtual Machines in Azure in China Cloud . Y...

1 year ago

Breaking change for Window Server 2022 Image Users with .NET 6

Azure Marketplace media images for Windows Server 2022 currently include .NET 6, but going forward will not include a .NET version with the im...

1 year ago

Announcing the public preview of the new Azure FXv2-series Virtual Machines

Today, Microsoft is announcing the public preview of the new Azure FXv2-series Virtual Machines (VMs), based on the 5th Generation Intel® Xeon...

1 year ago

Effortlessly Migrate Azure VMs between zones

For various reasons you might come across a situation when you need to migrate your Azure VMs from one zone to another. Migrating Azure VMs be...

1 year ago

Announcing Public Preview of Instance Mix on Virtual Machine Scale Sets

Today, we’re excited to announce that the ability to specify multiple different VM sizes in your Virtual Machine Scale Sets (VMSS) with Flexib...

1 year ago

Announcing General Availability of Attach & Detach of Virtual Machines on Virtual Machine Scale Sets

Today, we’re thrilled to announce that the ability to attach or detach Virtual Machines (VMs) to and from a Virtual Machine Scale Set (VMSS) w...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.