Sign in
Explore
Skills · SkillDevOps & CloudBusiness & OpsReviewed

azure-servicebus-py

Azure Service Bus for Python: queues, topics, subscriptions and enterprise messaging patterns.

Kind
Skill
Works with
Claude Code
Languages
Python
Source
microsoft/skills @ 2130750147de
Path
.github/plugins/azure-sdk-python/skills/azure-servicebus-py/SKILL.md
License
MIT
Jobs
Implementation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Azure Service Bus SDK for Python

Enterprise messaging for reliable cloud communication with queues and pub/sub topics.

## Installation

```bash
pip install azure-servicebus azure-identity
```

## Environment Variables

```bash
SERVICEBUS_FULLY_QUALIFIED_NAMESPACE=<namespace>.servicebus.windows.net  # Required for all auth methods
SERVICEBUS_QUEUE_NAME=myqueue  # Required for queue operations
SERVICEBUS_TOPIC_NAME=mytopic  # Required for topic operations
SERVICEBUS_SUBSCRIPTION_NAME=mysubscription  # Required for subscription operations
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
```

## Authentication & Lifecycle

> **🔑 Two rules apply to every code sample below:**
>
> 1. **Prefer `DefaultAzureCredential`.** It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation.
>    - Local dev: `DefaultAzureCredential` works as-is.
…