Azure / azure-functions-python-worker

Python worker for Azure Functions.
http://aka.ms/azurefunctions
MIT License
331 stars 100 forks source link

[FeatureRequest] SignalR extensions for V2 programming model #1410

Closed Y-Sindo closed 3 months ago

Y-Sindo commented 5 months ago

Seems SignalR extensions are not supported in V2 programming model. They are not listed here: https://learn.microsoft.com/en-us/python/api/azure-functions/azure.functions?view=azure-python

Is there a generic binding to support SignalR? Or is there any plan to add SignalR extensions to V2 programming model? If there is no plan now, can our Azure SignalR service product team add the SignalR extensions on our own? Do we have any onboarding guidance for the service team?

YunchuWang commented 3 months ago

@Y-Sindo thanks for raising the request! Yes generic bindings are supported as shown in the sample below:

@app.function_name(name="return_not_processed_last")
@app.generic_trigger(arg_name="req", type="httpTrigger",
                     route="return_not_processed_last")
@app.generic_output_binding(arg_name="$return", type="http")
@app.generic_input_binding(
    arg_name="testEntities",
    type="table",
    connection="AzureWebJobsStorage",
    table_name="EventHubBatchTest")
def return_not_processed_last(req: func.HttpRequest, testEntities):
    return func.HttpResponse(status_code=200)

To officially support SignalR, service teams can feel free to open a pr referencing https://github.com/Azure/azure-functions-python-library/pull/181.

microsoft-github-policy-service[bot] commented 3 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.