How to stream data back to frontend from Azure Functions App?

Tyler Suard 105 Reputation points
2024-01-16T16:49:10.6266667+00:00

Hello. I am using an Azure Functions App, and I am open to using an Azure Durable Functions App if necessary. I have a frontend, which is a Microsoft Teams App. Instead of using the usual HTTP request and response, I want to stream data from my Azure Functions App to my Teams app. I am having trouble finding out how to do that. Some resources online say that Azure Functions Apps cannot handle streaming, is that the same with Durable Functions Apps? I would like to use Server Side Events for streaming. Thank you for your help.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,425 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Gulnaz Mushtaq 410 Reputation points MVP
    2024-01-17T18:07:31.79+00:00

    Please note that this approach requires Django to be installed in your environment. If you’re not already using Django, you might need to adjust your project setup accordingly. Also, keep in mind that Azure Functions are stateless, so if you’re planning to stream large amounts of data, you might need to consider other approaches or services that are better suited for that purpose. Lastly, it’s worth noting that as of the time of the search, streaming data from Azure Functions was only officially supported in C#2. The Python solution provided here is a workaround and might not work in all scenarios. Always test thoroughly and consider the limitations of your chosen approach.

    0 comments No comments

  2. Mike Urnun 9,836 Reputation points Microsoft Employee
    2024-01-17T18:28:38.2+00:00

    Hello @Tyler Suard - Thanks for confirming that you're using Linux/Python. As of today, HTTP streaming response is yet to be supported in the Python Functions. Azure Functions team is actively working on this support, and you may track the following GitHub discussion for any updates on the matter: HTTP streaming response support for Azure functions #1349

    related threads:


    Please "Accept Answer" if the answer is helpful so that others in the community may benefit from your experience.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.