Microsoft Azure Notificationhubs Management Client Library for Python
Project description
Microsoft Azure SDK for Python
This is the Microsoft Azure Notification Hubs Management Client Library. This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the azure sdk python release.
Disclaimer
Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691
Getting started
Prerequisites
- Python 3.10+ is required to use this package.
- Azure subscription
Install the package
pip install azure-mgmt-notificationhubs
pip install azure-identity
Authentication
By default, Microsoft Entra token authentication depends on correct configuration of the following environment variables.
AZURE_CLIENT_IDfor Azure client ID.AZURE_TENANT_IDfor Azure tenant ID.AZURE_CLIENT_SECRETfor Azure client secret.
In addition, Azure subscription ID can be configured via environment variable AZURE_SUBSCRIPTION_ID.
With above configuration, client can be authenticated by following code:
from azure.identity import DefaultAzureCredential
from azure.mgmt.notificationhubs import NotificationHubsManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = NotificationHubsManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
Examples
Code samples for this package can be found at:
- Search Notification Hubs Management on docs.microsoft.com
- Azure Python Mgmt SDK Samples Repo
Troubleshooting
Next steps
Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.
Release History
8.1.0b3 (2026-07-08)
Features Added
- Client
NotificationHubsManagementClientadded parametercloud_settingin method__init__ - Client
NotificationHubsManagementClientadded methodsend_request
Breaking Changes
- This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration.
- Model
AdmCredentialmoved instance variablesclient_id,client_secretandauth_token_urlunder propertypropertieswhose type isAdmCredentialProperties - Model
ApnsCredentialmoved instance variablesapns_certificate,certificate_key,endpoint,thumbprint,key_id,app_name,app_idandtokenunder propertypropertieswhose type isApnsCredentialProperties - Model
BaiduCredentialmoved instance variablesbaidu_api_key,baidu_end_pointandbaidu_secret_keyunder propertypropertieswhose type isBaiduCredentialProperties - Model
BrowserCredentialmoved instance variablessubject,vapid_private_keyandvapid_public_keyunder propertypropertieswhose type isBrowserCredentialProperties - Model
DebugSendResponsemoved instance variablessuccess,failureandresultsunder propertypropertieswhose type isDebugSendResult - Model
FcmV1Credentialmoved instance variablesclient_email,private_keyandproject_idunder propertypropertieswhose type isFcmV1CredentialProperties - Model
GcmCredentialmoved instance variablesgcm_endpointandgoogle_api_keyunder propertypropertieswhose type isGcmCredentialProperties - Model
MpnsCredentialmoved instance variablesmpns_certificate,certificate_keyandthumbprintunder propertypropertieswhose type isMpnsCredentialProperties - Model
NamespaceResourcemoved instance variablesname_properties_name,provisioning_state,status,enabled,critical,subscription_id,region,metric_id,created_at,updated_at,namespace_type,replication_region,zone_redundancy,network_acls,pns_credentials,service_bus_endpoint,private_endpoint_connections,scale_unit,data_centerandpublic_network_accessunder propertypropertieswhose type isNamespaceProperties - Model
NotificationHubPatchParametersmoved instance variablesname,registration_ttl,authorization_rules,apns_credential,wns_credential,gcm_credential,mpns_credential,adm_credential,baidu_credential,browser_credential,xiaomi_credential,fcm_v1_credentialanddaily_max_active_devicesunder propertypropertieswhose type isNotificationHubProperties - Model
NotificationHubResourcemoved instance variablesname_properties_name,registration_ttl,authorization_rules,apns_credential,wns_credential,gcm_credential,mpns_credential,adm_credential,baidu_credential,browser_credential,xiaomi_credential,fcm_v1_credentialanddaily_max_active_devicesunder propertypropertieswhose type isNotificationHubProperties - Model
PnsCredentialsResourcemoved instance variablesadm_credential,apns_credential,baidu_credential,browser_credential,gcm_credential,mpns_credential,wns_credential,xiaomi_credentialandfcm_v1_credentialunder propertypropertieswhose type isPnsCredentials - Model
SharedAccessAuthorizationRuleResourcemoved instance variablesrights,primary_key,secondary_key,key_name,modified_time,created_time,claim_type,claim_valueandrevisionunder propertypropertieswhose type isSharedAccessAuthorizationRuleProperties - Model
WnsCredentialmoved instance variablespackage_sid,secret_key,windows_live_endpoint,certificate_keyandwns_certificateunder propertypropertieswhose type isWnsCredentialProperties - Model
XiaomiCredentialmoved instance variablesapp_secretandendpointunder propertypropertieswhose type isXiaomiCredentialProperties - Method
NamespacesOperations.listchanged its parameterskip_tokenfrompositional_or_keywordtokeyword_only - Parameter
topofNamespacesOperations.listis now optional - Method
NamespacesOperations.list_allchanged its parameterskip_tokenfrompositional_or_keywordtokeyword_only - Parameter
topofNamespacesOperations.list_allis now optional - Method
NotificationHubsOperations.listchanged its parameterskip_tokenfrompositional_or_keywordtokeyword_only - Parameter
topofNotificationHubsOperations.listis now optional
Other Changes
- Deleted model
NamespaceListResult/NotificationHubListResult/OperationListResult/PrivateEndpointConnectionResourceListResult/PrivateLinkResourceListResult/SharedAccessAuthorizationRuleListResultwhich actually were not used by SDK users - Deleted model
ConnectionDetails/GroupConnectivityInformation/PrivateLinkServiceConnectionwhich actually were not used by SDK users
8.1.0b2 (2024-03-21)
Features Added
- Added operation NamespacesOperations.delete
- Added operation NamespacesOperations.get_pns_credentials
- Added operation NamespacesOperations.update
- Added operation NotificationHubsOperations.update
- Added operation group PrivateEndpointConnectionsOperations
- Model CheckAvailabilityResult has a new parameter system_data
- Model DebugSendResponse has a new parameter system_data
- Model ErrorResponse has a new parameter error
- Model NamespacePatchParameters has a new parameter properties
- Model NamespaceResource has a new parameter network_acls
- Model NamespaceResource has a new parameter pns_credentials
- Model NamespaceResource has a new parameter private_endpoint_connections
- Model NamespaceResource has a new parameter public_network_access
- Model NamespaceResource has a new parameter replication_region
- Model NamespaceResource has a new parameter system_data
- Model NamespaceResource has a new parameter zone_redundancy
- Model NotificationHubPatchParameters has a new parameter browser_credential
- Model NotificationHubPatchParameters has a new parameter daily_max_active_devices
- Model NotificationHubPatchParameters has a new parameter fcm_v1_credential
- Model NotificationHubPatchParameters has a new parameter xiaomi_credential
- Model NotificationHubResource has a new parameter browser_credential
- Model NotificationHubResource has a new parameter daily_max_active_devices
- Model NotificationHubResource has a new parameter fcm_v1_credential
- Model NotificationHubResource has a new parameter system_data
- Model NotificationHubResource has a new parameter xiaomi_credential
- Model Operation has a new parameter is_data_action
- Model Operation has a new parameter properties
- Model OperationDisplay has a new parameter description
- Model PnsCredentialsResource has a new parameter browser_credential
- Model PnsCredentialsResource has a new parameter fcm_v1_credential
- Model PnsCredentialsResource has a new parameter system_data
- Model PnsCredentialsResource has a new parameter xiaomi_credential
- Model Resource has a new parameter system_data
- Model SharedAccessAuthorizationRuleResource has a new parameter system_data
- Model WnsCredential has a new parameter certificate_key
- Model WnsCredential has a new parameter wns_certificate
- Operation NamespacesOperations.list has a new optional parameter skip_token
- Operation NamespacesOperations.list has a new optional parameter top
- Operation NamespacesOperations.list_all has a new optional parameter skip_token
- Operation NamespacesOperations.list_all has a new optional parameter top
- Operation NotificationHubsOperations.list has a new optional parameter skip_token
- Operation NotificationHubsOperations.list has a new optional parameter top
Breaking Changes
- Model DebugSendResponse no longer has parameter sku
- Model ErrorResponse no longer has parameter code
- Model ErrorResponse no longer has parameter message
- Model NotificationHubPatchParameters no longer has parameter id
- Model NotificationHubPatchParameters no longer has parameter location
- Model NotificationHubPatchParameters no longer has parameter name_properties_name
- Model NotificationHubPatchParameters no longer has parameter type
- Model PnsCredentialsResource no longer has parameter sku
- Model Resource no longer has parameter location
- Model Resource no longer has parameter sku
- Model Resource no longer has parameter tags
- Model SharedAccessAuthorizationRuleResource no longer has parameter sku
- Operation NotificationHubsOperations.debug_send no longer has parameter parameters
- Parameter auth_token_url of model AdmCredential is now required
- Parameter baidu_api_key of model BaiduCredential is now required
- Parameter baidu_end_point of model BaiduCredential is now required
- Parameter baidu_secret_key of model BaiduCredential is now required
- Parameter certificate_key of model MpnsCredential is now required
- Parameter client_id of model AdmCredential is now required
- Parameter client_secret of model AdmCredential is now required
- Parameter endpoint of model ApnsCredential is now required
- Parameter google_api_key of model GcmCredential is now required
- Parameter location of model NamespaceResource is now required
- Parameter location of model NotificationHubResource is now required
- Parameter mpns_certificate of model MpnsCredential is now required
- Parameter rights of model SharedAccessAuthorizationRuleProperties is now required
- Parameter sku of model NamespaceResource is now required
- Parameter thumbprint of model MpnsCredential is now required
- Removed operation NamespacesOperations.begin_delete
- Removed operation NamespacesOperations.patch
- Removed operation NotificationHubsOperations.patch
- Renamed operation NamespacesOperations.create_or_update to NamespacesOperations.begin_create_or_update
8.1.0b1 (2022-11-11)
Other Changes
- Added generated samples in github repo
- Drop support for python<3.7.0
8.0.0 (2022-01-06)
Breaking changes
- Return type of
list_keysinNamespacesOperionschanged fromSharedAccessAuthorizationRuleListResulttoResourceListKeys
7.0.0 (2020-12-22)
- GA release
7.0.0b1 (2020-10-28)
This is beta preview version.
This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming).
General breaking changes
-
Credential system has been completly revamped:
azure.common.credentialsormsrestazure.azure_active_directoryinstances are no longer supported, use theazure-identityclasses instead: https://pypi.org/project/azure-identity/credentialsparameter has been renamedcredential
-
The
configattribute no longer exists on a client, configuration should be passed as kwarg. Example:MyClient(credential, subscription_id, enable_logging=True). For a complete set of supported options, see the parameters accept in init documentation of azure-core -
You can't import a
versionmodule anymore, use__version__instead -
Operations that used to return a
msrest.polling.LROPollernow returns aazure.core.polling.LROPollerand are prefixed withbegin_. -
Exceptions tree have been simplified and most exceptions are now
azure.core.exceptions.HttpResponseError(CloudErrorhas been removed). -
Most of the operation kwarg have changed. Some of the most noticeable:
rawhas been removed. Equivalent feature can be found usingcls, a callback that will give access to internal HTTP response for advanced user- For a complete set of supported options, see the parameters accept in Request documentation of azure-core
General new features
- Type annotations support using
typing. SDKs are mypy ready. - This client has now stable and official support for async. Check the
aionamespace of your package to find the async client. - This client now support natively tracing library like OpenCensus or OpenTelemetry. See this tracing quickstart for an overview.
2.1.0 (2019-04-30)
Features
- Added operation NotificationHubsOperations.patch
- Added operation NotificationHubsOperations.debug_send
2.0.0 (2018-05-25)
Features
- Model NamespaceResource has a new parameter updated_at
- Model NamespaceResource has a new parameter metric_id
- Model NamespaceResource has a new parameter data_center
- Model NamespaceCreateOrUpdateParameters has a new parameter updated_at
- Model NamespaceCreateOrUpdateParameters has a new parameter metric_id
- Model NamespaceCreateOrUpdateParameters has a new parameter data_center
- Added operation NotificationHubsOperations.check_notification_hub_availability
- Added operation group Operations
- Client class can be used as a context manager to keep the underlying HTTP session open for performance
Breaking changes
- Operation NotificationHubsOperations.create_or_update_authorization_rule has a new signature
- Operation NamespacesOperations.create_or_update_authorization_rule has a new signature
- Removed operation NotificationHubsOperations.check_availability (replaced by NotificationHubsOperations.check_notification_hub_availability)
- Model SharedAccessAuthorizationRuleResource has a new signature
- Model SharedAccessAuthorizationRuleProperties has a new signature
- Model SharedAccessAuthorizationRuleCreateOrUpdateParameters has a new signature
- Removed operation group NameOperations (replaced by NotificationHubsOperations.check_notification_hub_availability)
- Removed operation group HubsOperations (merged in NotificationHubsOperations)
General Breaking changes
This version uses a next-generation code generator that might introduce breaking changes.
- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to
improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important,
and are documented here:
https://docs.python.org/3/library/enum.html#others At a glance:
- "is" should not be used at all.
- "format" will return the string value, where "%s" string
formatting will return
NameOfEnum.stringvalue. Format syntax should be prefered.
- New Long Running Operation:
- Return type changes from
msrestazure.azure_operation.AzureOperationPollertomsrest.polling.LROPoller. External API is the same. - Return type is now always a
msrest.polling.LROPoller, regardless of the optional parameters used. - The behavior has changed when using
raw=True. Instead of returning the initial call result asClientRawResponse, without polling, now this returns an LROPoller. After polling, the final resource will be returned as aClientRawResponse. - New
pollingparameter. The default behavior isPolling=Truewhich will poll using ARM algorithm. WhenPolling=False, the response of the initial call will be returned without polling. pollingparameter accepts instances of subclasses ofmsrest.polling.PollingMethod.add_done_callbackwill no longer raise if called after polling is finished, but will instead execute the callback right away.
- Return type changes from
Bugfixes
- Compatibility of the sdist with wheel 0.31.0
1.0.0 (2017-06-27)
- New API Version 2017-04-01
- Expect breaking changes, migrating from an unstable client
This wheel package is built with the azure wheel extension
0.30.0 (2016-10-05)
- Preview release. Based on API version 2016-03-01.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file azure_mgmt_notificationhubs-8.1.0b3.tar.gz.
File metadata
- Download URL: azure_mgmt_notificationhubs-8.1.0b3.tar.gz
- Upload date:
- Size: 105.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cde85cb210dc8354ac0b8ad31e1af4f7194cdee1d2402d0e58515f730670a9d5
|
|
| MD5 |
22ae67833427d65e36ec5d07a584ed74
|
|
| BLAKE2b-256 |
85912159c8295df7e7ebe62696967bd0ee0f57eec7b08d110d3ea680eec2bc75
|
File details
Details for the file azure_mgmt_notificationhubs-8.1.0b3-py3-none-any.whl.
File metadata
- Download URL: azure_mgmt_notificationhubs-8.1.0b3-py3-none-any.whl
- Upload date:
- Size: 102.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ec62d120a4dd76a29d9e67a58f7e91c48e75be45a7397c87650de90eab971d1
|
|
| MD5 |
b706c644672cd1c791b330d1952771b0
|
|
| BLAKE2b-256 |
2f5d406b689d8e76919fdb74d8b1857484c179d5c09bbd9fc99b53c1204c8ef7
|