
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
azure-mgmt-cognitiveservices
Advanced tools
Microsoft Azure Cognitive Services Management Client Library for Python
This is the Microsoft Azure Cognitive Services Management Client Library. This package has been tested with Python 3.8+. For a more complete view of Azure libraries, see the azure sdk python release.
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
pip install azure-mgmt-cognitiveservices
pip install azure-identity
By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
AZURE_CLIENT_ID
for Azure client ID.AZURE_TENANT_ID
for Azure tenant ID.AZURE_CLIENT_SECRET
for 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.cognitiveservices import CognitiveServicesManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = CognitiveServicesManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
Code samples for this package can be found at:
If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.
CognitiveServicesManagementClient
added method calculate_model_capacity
CognitiveServicesManagementClient
added operation group location_based_model_capacities
CognitiveServicesManagementClient
added operation group model_capacities
CognitiveServicesManagementClient
added operation group encryption_scopes
CognitiveServicesManagementClient
added operation group rai_policies
CognitiveServicesManagementClient
added operation group rai_blocklists
CognitiveServicesManagementClient
added operation group rai_blocklist_items
CognitiveServicesManagementClient
added operation group rai_content_filters
CognitiveServicesManagementClient
added operation group network_security_perimeter_configurations
CognitiveServicesManagementClient
added operation group defender_for_ai_settings
AccountModel
added property publisher
AccountModel
added property source_account
AccountProperties
added property aml_workspace
AccountProperties
added property rai_monitor_config
CapacityConfig
added property allowed_values
CommitmentPlanAccountAssociation
added property tags
Deployment
added property tags
DeploymentModel
added property publisher
DeploymentModel
added property source_account
DeploymentProperties
added property dynamic_throttling_enabled
DeploymentProperties
added property current_capacity
DeploymentProperties
added property capacity_settings
DeploymentProperties
added property parent_deployment_name
Model
added property description
ModelLifecycleStatus
added member DEPRECATED
ModelLifecycleStatus
added member DEPRECATING
ModelLifecycleStatus
added member STABLE
ModelSku
added property cost
NetworkRuleSet
added property bypass
BillingMeterInfo
ByPassSelection
CalculateModelCapacityParameter
CalculateModelCapacityResult
CalculateModelCapacityResultEstimatedCapacity
ContentLevel
CustomBlocklistConfig
DefenderForAISetting
DefenderForAISettingResult
DefenderForAISettingState
DeploymentCapacitySettings
DeploymentSkuListResult
EncryptionScope
EncryptionScopeListResult
EncryptionScopeProperties
EncryptionScopeProvisioningState
EncryptionScopeState
ModelCapacityCalculatorWorkload
ModelCapacityCalculatorWorkloadRequestParam
ModelCapacityListResult
ModelCapacityListResultValueItem
ModelSkuCapacityProperties
NetworkSecurityPerimeter
NetworkSecurityPerimeterAccessRule
NetworkSecurityPerimeterAccessRuleProperties
NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem
NetworkSecurityPerimeterConfiguration
NetworkSecurityPerimeterConfigurationAssociationInfo
NetworkSecurityPerimeterConfigurationList
NetworkSecurityPerimeterConfigurationProperties
NetworkSecurityPerimeterProfileInfo
NspAccessRuleDirection
ProvisioningIssue
ProvisioningIssueProperties
RaiBlockListItemsResult
RaiBlockListResult
RaiBlocklist
RaiBlocklistConfig
RaiBlocklistItem
RaiBlocklistItemBulkRequest
RaiBlocklistItemProperties
RaiBlocklistProperties
RaiContentFilter
RaiContentFilterListResult
RaiContentFilterProperties
RaiMonitorConfig
RaiPolicy
RaiPolicyContentFilter
RaiPolicyContentSource
RaiPolicyListResult
RaiPolicyMode
RaiPolicyProperties
RaiPolicyType
SkuResource
UserOwnedAmlWorkspace
CognitiveServicesManagementClientOperationsMixin
added method calculate_model_capacity
DeploymentsOperations
added method begin_update
DeploymentsOperations
added method list_skus
DefenderForAISettingsOperations
EncryptionScopesOperations
LocationBasedModelCapacitiesOperations
ModelCapacitiesOperations
NetworkSecurityPerimeterConfigurationsOperations
RaiBlocklistItemsOperations
RaiBlocklistsOperations
RaiContentFiltersOperations
RaiPoliciesOperations
Features
scale_type
of Model DeploymentScaleType has a new Enum type STANDARDFeatures
Features
Breaking changes
Features
Breaking changes
Features
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.credentials
or msrestazure.azure_active_directory
instances are no longer supported, use the azure-identity
classes instead: https://pypi.org/project/azure-identity/credentials
parameter has been renamed credential
The config
attribute 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 version
module anymore, use __version__
instead
Operations that used to return a msrest.polling.LROPoller
now returns a azure.core.polling.LROPoller
and are prefixed with begin_
.
Exceptions tree have been simplified and most exceptions are now azure.core.exceptions.HttpResponseError
(CloudError
has been removed).
Most of the operation kwarg have changed. Some of the most noticeable:
raw
has been removed. Equivalent feature can be found using cls
, a callback that will give access to internal HTTP response for advanced userGeneral new features
typing
. SDKs are mypy ready.aio
namespace of your package to find the async client.Features
Features
Features
Features
Breaking changes
Features
General Breaking changes
This version uses a next-generation code generator that might introduce breaking changes for some imports. In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place.
azure.mgmt.cognitiveservices.v20xx_yy_zz.cognitive_services_management_client
anymore (import from azure.mgmt.cognitiveservices.v20xx_yy_zz
works like before)azure.mgmt.cognitiveservices.v20xx_yy_zz.cognitive_services_management_client
to azure.mgmt.cognitiveservices.v20xx_yy_zz
MyClass
from a "models" sub-module cannot be imported
anymore using
azure.mgmt.cognitiveservices.v20xx_yy_zz.models.my_class
(import from azure.mgmt.cognitiveservices.v20xx_yy_zz.models
works like before)MyClassOperations
from an operations
sub-module cannot be imported anymore using
azure.mgmt.cognitiveservices.v20xx_yy_zz.operations.my_class_operations
(import from
azure.mgmt.cognitiveservices.v20xx_yy_zz.operations
works like
before)Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process.
Features
Breaking changes
General Breaking changes
This version uses a next-generation code generator that might introduce breaking changes.
NameOfEnum.stringvalue
. Format syntax
should be prefered.msrestazure.azure_operation.AzureOperationPoller
to
msrest.polling.LROPoller
. External API is the same.msrest.polling.LROPoller
,
regardless of the optional parameters used.raw=True
. Instead of
returning the initial call result as ClientRawResponse
,
without polling, now this returns an LROPoller. After polling,
the final resource will be returned as a ClientRawResponse
.polling
parameter. The default behavior is
Polling=True
which will poll using ARM algorithm. When
Polling=False
, the response of the initial call will be
returned without polling.polling
parameter accepts instances of subclasses of
msrest.polling.PollingMethod
.add_done_callback
will no longer raise if called after
polling is finished, but will instead execute the callback right
away.Features
Bugfixes
Breaking changes
FAQs
Microsoft Azure Cognitive Services Management Client Library for Python
We found that azure-mgmt-cognitiveservices demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.