[FeatureRequest] --WebPubSub class and UserEventResponse--

Open
#1,473 1 comment 0 reactions 1 assignee View on GitHub

@bhagyshricompany is already working on this.

Since Apr 16, 2024.

Assessment

This issue has not been assessed yet.

Description

area:python-functions feature python-sdk

I am looking at the documentation for Web PubSub and more precisely Tutorial: Create a serverless real-time chat app with Azure Functions and Azure Web PubSub service. There I want to contribute and to add example for Python, but I have 2 concerns. First is that there is no functionality like in Javascript and C# for returning direct response to the caller:

`module.exports = async function (context, data) {

context.bindings.actions = {
actionName: "sendToAll",
data: [${context.bindingData.request.connectionContext.userId}] ${data},
dataType: context.bindingData.dataType,
};
// UserEventResponse directly return to caller
var response = {
data: "[SYSTEM] ack.",
dataType: "text",
};
return response;
};`

I think there is a good idea to add some class which supports the request from webPubSubTrigger and functionality to return the message to the caller.

Dominant language
Python
Stars
357
Forks
116
Avg merge
32m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-functions-python-worker

All issues in Azure/azure-functions-python-worker

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.