[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EXM213AS9EYD7X90V9Z3EX":3,"skill-same:01M6EXM213AS9EYD7X90V9Z3EX":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6EXM213AS9EYD7X90V9Z3EX","azure-messaging-webpubsubservice-py",null,"Azure Web PubSub Service SDK for Python. Use for real-time messaging, WebSocket connections, and pub\u002Fsub patterns.\nTriggers: \"azure-messaging-webpubsubservice\", \"WebPubSubServiceClient\", \"real-time\", \"WebSocket\", \"pub\u002Fsub\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-messaging-webpubsubservice-py\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"azure messaging","azure","azure messaging webpubsubservice py","messaging","real-time","pubsub","azure web pubsub","triggers","service","time","connections","patterns","use","python","websocket","web","sdk","2026-11-10 10:12:30",false,"---\nname: azure-messaging-webpubsubservice-py\ndescription: |\n  Azure Web PubSub Service SDK for Python. Use for real-time messaging, WebSocket connections, and pub\u002Fsub patterns.\n  Triggers: \"azure-messaging-webpubsubservice\", \"WebPubSubServiceClient\", \"real-time\", \"WebSocket\", \"pub\u002Fsub\".\npackage: azure-messaging-webpubsubservice\n---\n\n# Azure Web PubSub Service SDK for Python\n\nReal-time messaging with WebSocket connections at scale.\n\n## Installation\n\n```bash\n# Service SDK (server-side)\npip install azure-messaging-webpubsubservice\n\n# Client SDK (for Python WebSocket clients)\npip install azure-messaging-webpubsubclient\n```\n\n## Environment Variables\n\n```bash\nAZURE_WEBPUBSUB_CONNECTION_STRING=Endpoint=https:\u002F\u002F\u003Cname>.webpubsub.azure.com;AccessKey=...\nAZURE_WEBPUBSUB_HUB=my-hub\n```\n\n## Service Client (Server-Side)\n\n### Authentication\n\n```python\nfrom azure.messaging.webpubsubservice import WebPubSubServiceClient\n\n# Connection string\nclient = WebPubSubServiceClient.from_connection_string(\n    connection_string=os.environ[\"AZURE_WEBPUBSUB_CONNECTION_STRING\"],\n    hub=\"my-hub\"\n)\n\n# Entra ID\nfrom azure.identity import DefaultAzureCredential\n\nclient = WebPubSubServiceClient(\n    endpoint=\"https:\u002F\u002F\u003Cname>.webpubsub.azure.com\",\n    hub=\"my-hub\",\n    credential=DefaultAzureCredential()\n)\n```\n\n### Generate Client Access Token\n\n```python\n# Token for anonymous user\ntoken = client.get_client_access_token()\nprint(f\"URL: {token['url']}\")\n\n# Token with user ID\ntoken = client.get_client_access_token(\n    user_id=\"user123\",\n    roles=[\"webpubsub.sendToGroup\", \"webpubsub.joinLeaveGroup\"]\n)\n\n# Token with groups\ntoken = client.get_client_access_token(\n    user_id=\"user123\",\n    groups=[\"group1\", \"group2\"]\n)\n```\n\n### Send to All Clients\n\n```python\n# Send text\nclient.send_to_all(message=\"Hello everyone!\", content_type=\"text\u002Fplain\")\n\n# Send JSON\nclient.send_to_all(\n    message={\"type\": \"notification\", \"data\": \"Hello\"},\n    content_type=\"application\u002Fjson\"\n)\n```\n\n### Send to User\n\n```python\nclient.send_to_user(\n    user_id=\"user123\",\n    message=\"Hello user!\",\n    content_type=\"text\u002Fplain\"\n)\n```\n\n### Send to Group\n\n```python\nclient.send_to_group(\n    group=\"my-group\",\n    message=\"Hello group!\",\n    content_type=\"text\u002Fplain\"\n)\n```\n\n### Send to Connection\n\n```python\nclient.send_to_connection(\n    connection_id=\"abc123\",\n    message=\"Hello connection!\",\n    content_type=\"text\u002Fplain\"\n)\n```\n\n### Group Management\n\n```python\n# Add user to group\nclient.add_user_to_group(group=\"my-group\", user_id=\"user123\")\n\n# Remove user from group\nclient.remove_user_from_group(group=\"my-group\", user_id=\"user123\")\n\n# Add connection to group\nclient.add_connection_to_group(group=\"my-group\", connection_id=\"abc123\")\n\n# Remove connection from group\nclient.remove_connection_from_group(group=\"my-group\", connection_id=\"abc123\")\n```\n\n### Connection Management\n\n```python\n# Check if connection exists\nexists = client.connection_exists(connection_id=\"abc123\")\n\n# Check if user has connections\nexists = client.user_exists(user_id=\"user123\")\n\n# Check if group has connections\nexists = client.group_exists(group=\"my-group\")\n\n# Close connection\nclient.close_connection(connection_id=\"abc123\", reason=\"Session ended\")\n\n# Close all connections for user\nclient.close_all_connections(user_id=\"user123\")\n```\n\n### Grant\u002FRevoke Permissions\n\n```python\nfrom azure.messaging.webpubsubservice import WebPubSubServiceClient\n\n# Grant permission\nclient.grant_permission(\n    permission=\"joinLeaveGroup\",\n    connection_id=\"abc123\",\n    target_name=\"my-group\"\n)\n\n# Revoke permission\nclient.revoke_permission(\n    permission=\"joinLeaveGroup\",\n    connection_id=\"abc123\",\n    target_name=\"my-group\"\n)\n\n# Check permission\nhas_permission = client.check_permission(\n    permission=\"joinLeaveGroup\",\n    connection_id=\"abc123\",\n    target_name=\"my-group\"\n)\n```\n\n## Client SDK (Python WebSocket Client)\n\n```python\nfrom azure.messaging.webpubsubclient import WebPubSubClient\n\nclient = WebPubSubClient(credential=token[\"url\"])\n\n# Event handlers\n@client.on(\"connected\")\ndef on_connected(e):\n    print(f\"Connected: {e.connection_id}\")\n\n@client.on(\"server-message\")\ndef on_message(e):\n    print(f\"Message: {e.data}\")\n\n@client.on(\"group-message\")\ndef on_group_message(e):\n    print(f\"Group {e.group}: {e.data}\")\n\n# Connect and send\nclient.open()\nclient.send_to_group(\"my-group\", \"Hello from Python!\")\n```\n\n## Async Service Client\n\n```python\nfrom azure.messaging.webpubsubservice.aio import WebPubSubServiceClient\nfrom azure.identity.aio import DefaultAzureCredential\n\nasync def broadcast():\n    credential = DefaultAzureCredential()\n    client = WebPubSubServiceClient(\n        endpoint=\"https:\u002F\u002F\u003Cname>.webpubsub.azure.com\",\n        hub=\"my-hub\",\n        credential=credential\n    )\n    \n    await client.send_to_all(\"Hello async!\", content_type=\"text\u002Fplain\")\n    \n    await client.close()\n    await credential.close()\n```\n\n## Client Operations\n\n| Operation | Description |\n|-----------|-------------|\n| `get_client_access_token` | Generate WebSocket connection URL |\n| `send_to_all` | Broadcast to all connections |\n| `send_to_user` | Send to specific user |\n| `send_to_group` | Send to group members |\n| `send_to_connection` | Send to specific connection |\n| `add_user_to_group` | Add user to group |\n| `remove_user_from_group` | Remove user from group |\n| `close_connection` | Disconnect client |\n| `connection_exists` | Check connection status |\n\n## Best Practices\n\n1. **Use roles** to limit client permissions\n2. **Use groups** for targeted messaging\n3. **Generate short-lived tokens** for security\n4. **Use user IDs** to send to users across connections\n5. **Handle reconnection** in client applications\n6. **Use JSON** content type for structured data\n7. **Close connections** gracefully with reasons\n","# Azure Web PubSub Service SDK for Python\n\nReal-time messaging with WebSocket connections at scale.\n\n## Installation\n\n```bash\n# Service SDK (server-side)\npip install azure-messaging-webpubsubservice\n\n# Client SDK (for Python WebSocket clients)\npip install azure-messaging-webpubsubclient\n```\n\n## Environment Variables\n\n```bash\nAZURE_WEBPUBSUB_CONNECTION_STRING=Endpoint=https:\u002F\u002F\u003Cname>.webpubsub.azure.com;AccessKey=...\nAZURE_WEBPUBSUB_HUB=my-hub\n```\n\n## Service Client (Server-Side)\n\n### Authentication\n\n```python\nfrom azure.messaging.webpubsubservice import WebPubSubServiceClient\n\n# Connection string\nclient = WebPubSubServiceClient.from_connection_string(\n    connection_string=os.environ[\"AZURE_WEBPUBSUB_CONNECTION_STRING\"],\n    hub=\"my-hub\"\n)\n\n# Entra ID\nfrom azure.identity import DefaultAzureCredential\n\nclient = WebPubSubServiceClient(\n    endpoint=\"https:\u002F\u002F\u003Cname>.webpubsub.azure.com\",\n    hub=\"my-hub\",\n    credential=DefaultAzureCredential()\n)\n```\n\n### Generate Client Access Token\n\n```python\n# Token for anonymous user\ntoken = client.get_client_access_token()\nprint(f\"URL: {token['url']}\")\n\n# Token with user ID\ntoken = client.get_client_access_token(\n    user_id=\"user123\",\n    roles=[\"webpubsub.sendToGroup\", \"webpubsub.joinLeaveGroup\"]\n)\n\n# Token with groups\ntoken = client.get_client_access_token(\n    user_id=\"user123\",\n    groups=[\"group1\", \"group2\"]\n)\n```\n\n### Send to All Clients\n\n```python\n# Send text\nclient.send_to_all(message=\"Hello everyone!\", content_type=\"text\u002Fplain\")\n\n# Send JSON\nclient.send_to_all(\n    message={\"type\": \"notification\", \"data\": \"Hello\"},\n    content_type=\"application\u002Fjson\"\n)\n```\n\n### Send to User\n\n```python\nclient.send_to_user(\n    user_id=\"user123\",\n    message=\"Hello user!\",\n    content_type=\"text\u002Fplain\"\n)\n```\n\n### Send to Group\n\n```python\nclient.send_to_group(\n    group=\"my-group\",\n    message=\"Hello group!\",\n    content_type=\"text\u002Fplain\"\n)\n```\n\n### Send to Connection\n\n```python\nclient.send_to_connection(\n    connection_id=\"abc123\",\n    message=\"Hello connection!\",\n    content_type=\"text\u002Fplain\"\n)\n```\n\n### Group Management\n\n```python\n# Add user to group\nclient.add_user_to_group(group=\"my-group\", user_id=\"user123\")\n\n# Remove user from group\nclient.remove_user_from_group(group=\"my-group\", user_id=\"user123\")\n\n# Add connection to group\nclient.add_connection_to_group(group=\"my-group\", connection_id=\"abc123\")\n\n# Remove connection from group\nclient.remove_connection_from_group(group=\"my-group\", connection_id=\"abc123\")\n```\n\n### Connection Management\n\n```python\n# Check if connection exists\nexists = client.connection_exists(connection_id=\"abc123\")\n\n# Check if user has connections\nexists = client.user_exists(user_id=\"user123\")\n\n# Check if group has connections\nexists = client.group_exists(group=\"my-group\")\n\n# Close connection\nclient.close_connection(connection_id=\"abc123\", reason=\"Session ended\")\n\n# Close all connections for user\nclient.close_all_connections(user_id=\"user123\")\n```\n\n### Grant\u002FRevoke Permissions\n\n```python\nfrom azure.messaging.webpubsubservice import WebPubSubServiceClient\n\n# Grant permission\nclient.grant_permission(\n    permission=\"joinLeaveGroup\",\n    connection_id=\"abc123\",\n    target_name=\"my-group\"\n)\n\n# Revoke permission\nclient.revoke_permission(\n    permission=\"joinLeaveGroup\",\n    connection_id=\"abc123\",\n    target_name=\"my-group\"\n)\n\n# Check permission\nhas_permission = client.check_permission(\n    permission=\"joinLeaveGroup\",\n    connection_id=\"abc123\",\n    target_name=\"my-group\"\n)\n```\n\n## Client SDK (Python WebSocket Client)\n\n```python\nfrom azure.messaging.webpubsubclient import WebPubSubClient\n\nclient = WebPubSubClient(credential=token[\"url\"])\n\n# Event handlers\n@client.on(\"connected\")\ndef on_connected(e):\n    print(f\"Connected: {e.connection_id}\")\n\n@client.on(\"server-message\")\ndef on_message(e):\n    print(f\"Message: {e.data}\")\n\n@client.on(\"group-message\")\ndef on_group_message(e):\n    print(f\"Group {e.group}: {e.data}\")\n\n# Connect and send\nclient.open()\nclient.send_to_group(\"my-group\", \"Hello from Python!\")\n```\n\n## Async Service Client\n\n```python\nfrom azure.messaging.webpubsubservice.aio import WebPubSubServiceClient\nfrom azure.identity.aio import DefaultAzureCredential\n\nasync def broadcast():\n    credential = DefaultAzureCredential()\n    client = WebPubSubServiceClient(\n        endpoint=\"https:\u002F\u002F\u003Cname>.webpubsub.azure.com\",\n        hub=\"my-hub\",\n        credential=credential\n    )\n    \n    await client.send_to_all(\"Hello async!\", content_type=\"text\u002Fplain\")\n    \n    await client.close()\n    await credential.close()\n```\n\n## Client Operations\n\n| Operation | Description |\n|-----------|-------------|\n| `get_client_access_token` | Generate WebSocket connection URL |\n| `send_to_all` | Broadcast to all connections |\n| `send_to_user` | Send to specific user |\n| `send_to_group` | Send to group members |\n| `send_to_connection` | Send to specific connection |\n| `add_user_to_group` | Add user to group |\n| `remove_user_from_group` | Remove user from group |\n| `close_connection` | Disconnect client |\n| `connection_exists` | Check connection status |\n\n## Best Practices\n\n1. **Use roles** to limit client permissions\n2. **Use groups** for targeted messaging\n3. **Generate short-lived tokens** for security\n4. **Use user IDs** to send to users across connections\n5. **Handle reconnection** in client applications\n6. **Use JSON** content type for structured data\n7. **Close connections** gracefully with reasons\n",{"name":5,"package":41,"description":42},"azure-messaging-webpubsubservice","Azure Web PubSub Service SDK for Python. Use for real-time messaging, WebSocket connections, and pub\u002Fsub patterns.\nTriggers: \"azure-messaging-webpubsubservice\", \"WebPubSubServiceClient\", \"real-time\", \"WebSocket\", \"pub\u002Fsub\".\n","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-messaging-webpubsubservice-py",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill azure-messaging-webpubsubservice-py",{"tool":58,"command":59},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill azure-messaging-webpubsubservice-py",{"tool":61,"command":62},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill azure-messaging-webpubsubservice-py","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-messaging-webpubsubservice-py\u002FSKILL.md",true,[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"skill-report.json","REFERENCE","参考文档",8056,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-messaging-webpubsubservice-py\u002Fskill-report.json",[73,87,97,105,111,118],{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":83,"publishedAt":36},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[78],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[84,85,86],"model","model hierarchy","model hierarchy skill",{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":93,"publishedAt":36},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[92],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},[94,95,96],"MCP","zoom","zoom mcp",{"skillNo":98,"name":99,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":36},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[35,103,104,95],"zoom apps sdk","apps",{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":36},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[107],{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":117,"publishedAt":36},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[116],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},[113],{"skillNo":119,"name":120,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":36},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[120]]