Azure / Azure/azure-functions-python-worker

[FeatureRequest] --WebPubSub class and UserEventResponse--

オープン
#1,473 コメント 1 件 リアクション 0 件 担当者 1 名 @bhagyshricompany が担当を希望しています GitHub で見る
area:python-functions feature python-sdk
主要言語
Python
スター
357
フォーク
116
平均マージ
32分
マージ済み PR(30日)
1

説明

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](https://learn.microsoft.com/en-us/azure/azure-web-pubsub/quickstart-serverless?tabs=javascript-v4). 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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。