azure-messaging-webpubsubservice-py

Generate client access tokens and broadcast messages to Azure Web PubSub connections.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-messaging-webpubsubservice-py-davidrrowley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-messaging-webpubsubservice-py
Source: https://github.com/davidrrowley/CortexYouV3/tree/main/.agents/skills/azure-messaging-webpubsubservice-py
Command: npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-messaging-webpubsubservice-py-davidrrowley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides clear server-side guidance for creating and managing real-time WebSocket connections, issuing short-lived client tokens, and broadcasting messages so backend services can reliably implement pub/sub and targeted messaging without reimplementing protocol details.

Core Features & Use Cases

  • Token Generation: Create short-lived client access tokens with optional user IDs, roles, and groups for secure WebSocket connections.
  • Broadcast & Targeting: Broadcast to all connections or send to specific users, groups, or individual connections for notifications, chat, and live updates.
  • Connection & Group Management: Manage connections and group membership, check existence, and gracefully close connections for session control.
  • Use Case: A Python backend issues ephemeral tokens to web clients, groups participants into rooms, and broadcasts live game state or stock updates to relevant subscribers.

Quick Start

Create a Python service that uses the Azure WebPubSub Service client to generate a client access token for a user and broadcast a JSON notification to a designated hub and group.

Frequently Asked Questions about azure-messaging-webpubsubservice-py

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate client access tokens for Azure Web PubSub WebSocket connections in Python?

To generate client access tokens for Azure Web PubSub WebSocket connections, you can use server-side Python APIs to create short-lived tokens with optional user IDs, roles, and groups for secure authentication.

What is the best way to broadcast real-time WebSocket messages to specific user groups in a Python backend?

Broadcasting real-time WebSocket messages to specific user groups in a Python backend is achieved through Azure Web PubSub, which supports targeted group broadcasts, user-scoped messaging, and connection lifecycle management.

Can I use azure-identity for secure credential handling with a Python Web PubSub service client?

Yes, you can use azure-identity for secure credential handling with a Python Web PubSub service client, as the server-side APIs support integration with azure-identity to manage authentication safely.

Does Azure Web PubSub support both synchronous and asynchronous client usage in Python?

Azure Web PubSub supports both synchronous and asynchronous client usage in Python, allowing backend services to manage pub/sub messaging, connection token issuance, and group management flexibly.

How do I manage WebSocket connection lifecycle and group membership for a chat application using Python?

To manage the WebSocket connection lifecycle and group membership for chat applications, Python backend services can check connection existence, manage group participants, and gracefully close connections using Azure Web PubSub APIs.

When do I need Azure Web PubSub for real-time messaging instead of a basic WebSocket server?

You need Azure Web PubSub for real-time messaging instead of a basic WebSocket server when your Python backend requires pub/sub messaging at scale, targeted group broadcasts, user-scoped messaging, and connection lifecycle management without reimplementing protocol details.