Registry / azure / azure-mgmt-notificationhubs

azure-mgmt-notificationhubs

JSON →
library8.0.0pypypi✓ verified 27d ago

Microsoft Azure Notification Hubs Management Client Library for Python, currently at version 8.0.0. This package provides programmatic access to manage Azure Notification Hubs resources, enabling operations like creating and configuring namespaces and notification hubs. It is part of the Azure SDK for Python, which typically follows a monthly or bi-monthly release cadence for updates and bug fixes, with major versions introducing breaking changes.

pip install azure-mgmt-notificationhubs azure-identity
INSTALL
IMPORT
SIG · AZURE-MGMT-NOTIFIC
A
azure-mgmt-notificationhubs
azurepythonv8.0.0
Install
4.1s avg
Import
—
Disk
45MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v8.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 46MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 4.1s · import 0.000s · 46MB
45MB installed
● package 45MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NotificationHubsManagementClient
✓ from azure.mgmt.notificationhubs import NotificationHubsManagementClient
DefaultAzureCredential
✓ from azure.identity import DefaultAzureCredential
✗ from azure.common.credentials import ServicePrincipalCredentials
Old credential classes like `azure.common.credentials` or `msrestazure.azure_active_directory` are deprecated and will not work with recent versions of Azure SDK management clients. Use classes from `azure-identity` instead.

This quickstart demonstrates how to instantiate the `NotificationHubsManagementClient` using `DefaultAzureCredential` and list all Notification Hub namespaces within a subscription. Ensure `AZURE_SUBSCRIPTION_ID` and appropriate Azure AD credentials (e.g., `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_TENANT_ID` for a service principal) are set as environment variables.

import os from azure.identity import DefaultAzureCredential from azure.mgmt.notificationhubs import NotificationHubsManagementClient # Set environment variables for authentication and subscription ID # AZURE_SUBSCRIPTION_ID # AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID (for Service Principal) subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "<your-subscription-id>") credential = DefaultAzureCredential() client = NotificationHubsManagementClient(credential, subscription_id) print("Listing Notification Hub namespaces...") for namespace in client.namespaces.list_all(): print(f"- Namespace: {namespace.name} (Location: {namespace.location})") print("Quickstart complete.")
Debug
Known issues
breakingMajor breaking changes occurred in version 8.0.0, primarily affecting client instantiation and authentication. Old credential systems (`azure.common.credentials`, `msrestazure.azure_active_directory`) are no longer supported. The `credentials` parameter was renamed to `credential`, and client configuration is now passed as keyword arguments instead of through a `config` attribute.
fix
Migrate authentication to `azure-identity` classes (e.g., `DefaultAzureCredential`). Update client instantiation to pass `credential` and other configurations as kwargs.
affects: >=8.0.0
breakingThe return type of `list_keys` in `NamespacesOperations` changed from `SharedAccessAuthorizationRuleListResult` to `ResourceListKeys` in version 8.0.0.
fix
Update code that processes the return value of `list_keys` to expect `ResourceListKeys` type.
affects: >=8.0.0
deprecatedSupport for Python 2.7 for Azure SDK Python packages ended on January 1, 2022.
fix
Ensure your project uses Python 3.7 or newer.
affects: <8.0.0 (Python 2.7 support), All versions (Python 3.x required)
gotchaAll Azure management clients, including `NotificationHubsManagementClient`, require an authenticated credential. The recommended approach is to use `azure-identity` to obtain credentials, such as `DefaultAzureCredential`, which simplifies authentication across various Azure environments.
fix
Always pass a `TokenCredential` instance from `azure.identity` to the client constructor. Avoid hardcoding credentials; use environment variables or Managed Identities.
affects: All
Upgrade
Version history
8.0.0latest on PyPI · released Jan 6, 2022
Audit
Dependencies
azure-identityrequiredRequired for Azure Active Directory authentication with management clients.
azure-corerequiredProvides shared core functionality for Azure SDK libraries (e.g., HTTP pipeline, logging, retries).
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
azure-mgmt-notificationhubs — pip install azure-mgmt-notificationhubs · libregistry