{"library":"azure-mgmt-containerregistry","title":"Azure Container Registry Management Client Library","description":"The Microsoft Azure Container Registry Management Client Library for Python facilitates programmatic interaction with Azure Container Registry resources. It allows developers to manage container registries, replications, webhooks, tasks, and other associated components within Azure. The library is currently at version 15.0.0, actively maintained as part of the broader Azure SDK for Python, and follows a frequent release cadence to support the latest Azure API versions. [1, 6, 9, 10, 15]","status":"active","version":"15.0.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/containerregistry/azure-mgmt-containerregistry","tags":["azure","cloud","container-registry","management","sdk","acr"],"install":[{"cmd":"pip install azure-mgmt-containerregistry azure-identity","lang":"bash","label":"Install core library and Azure Identity for authentication"}],"dependencies":[{"reason":"Requires Python 3.9 or later.","package":"Python","optional":false},{"reason":"Recommended for Azure Active Directory authentication.","package":"azure-identity","optional":false}],"imports":[{"note":"While API versions exist (e.g., v2021_08_01_preview), the top-level import generally points to the latest stable API version unless a specific older version is explicitly required. Pinning to a major version of the package is recommended over pinning to a specific API version in the import path. [12, 13]","wrong":"from azure.mgmt.containerregistry.vXXXX_XX_XX import ContainerRegistryManagementClient","symbol":"ContainerRegistryManagementClient","correct":"from azure.mgmt.containerregistry import ContainerRegistryManagementClient"},{"note":"Azure management libraries now standardize on `azure-identity` for credentials. [1]","symbol":"DefaultAzureCredential","correct":"from azure.identity import DefaultAzureCredential"}],"quickstart":{"code":"import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.mgmt.containerregistry import ContainerRegistryManagementClient\n\n# Set your Azure Subscription ID as an environment variable (e.g., AZURE_SUBSCRIPTION_ID)\n# Set other Azure Identity related environment variables (e.g., AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET)\n# For more info: https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication-overview\n\nsubscription_id = os.environ.get(\"AZURE_SUBSCRIPTION_ID\", \"your_subscription_id\")\n\nif subscription_id == \"your_subscription_id\":\n    print(\"Please set the AZURE_SUBSCRIPTION_ID environment variable.\")\nelse:\n    # Authenticate using DefaultAzureCredential\n    # This credential will attempt to authenticate via environment variables, managed identity, Azure CLI, etc.\n    credential = DefaultAzureCredential()\n\n    # Create a ContainerRegistryManagementClient\n    client = ContainerRegistryManagementClient(credential, subscription_id)\n\n    # Example: List all container registries in the subscription\n    print(f\"Listing container registries in subscription: {subscription_id}\")\n    for registry in client.registries.list():\n        print(f\"  - {registry.name} (Location: {registry.location})\")","lang":"python","description":"This quickstart demonstrates how to authenticate with Azure using `DefaultAzureCredential` and then list all Azure Container Registries within a specified subscription. Ensure you have the necessary environment variables set for Azure authentication (e.g., `AZURE_SUBSCRIPTION_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`). [7, 14]"},"warnings":[{"fix":"Refer to the official migration guide for `azure-mgmt-containerregistry` (aka.ms/azsdk/python/migrate/azure-mgmt-containerregistry) and install `azure-mgmt-containerregistrytasks` if needed.","message":"Breaking change in 15.0.0: Some APIs related to container registry tasks have been moved to a new, more focused package: `azure-mgmt-containerregistrytasks`. If your application uses these APIs, you must migrate to the new package. [1, 2]","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"Migrate to `azure-identity` classes (e.g., `DefaultAzureCredential`) for authentication and update client constructor calls to use the `credential` parameter. See `https://pypi.org/project/azure-identity/` for details. [1]","message":"Breaking change in 15.0.0: The credential system has been completely revamped. Older authentication methods like `azure.common.credentials` or `msrestazure.azure_active_directory` are no longer supported. The `credentials` parameter for client initialization has been renamed to `credential`. [1]","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"If your application relies on a specific, non-latest API-Version, it is recommended to pin the package to a previous major version of `azure-mgmt-containerregistry`. If you always use the latest API, no action is needed. [1]","message":"Breaking change in 15.0.0 and subsequent versions: The package now exclusively targets the latest API-Version available on Azure, removing APIs from older versions to reduce package size. [1]","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"Consult the migration guide for hybrid models (aka.ms/azsdk/python/migrate/hybrid-models) to understand the new model behavior and update your code accordingly. [1]","message":"Breaking change in 15.0.0: Introduction of new 'hybrid models' which possess both dictionary and model nature. This might impact how you access or manipulate model properties. [1, 2]","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"Review your code for direct access to these properties or models and update them to use the new structure as per the release notes or migration guides. Pinning to a previous major version might be necessary if immediate migration is not feasible. [2]","message":"Breaking change in 15.0.0: Several model instance variables, such as `location` and `tags` on the `Resource` model, have been deleted or renamed. Other models like `ActiveDirectoryObject` and `ConnectedRegistryPropertiesActivation` might also have been removed or renamed. [2]","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"Microsoft strongly recommends upgrading to the latest versions of Azure SDK libraries (like 15.0.0+) to benefit from ongoing security updates, performance improvements, and new features. [18]","message":"Older Azure SDK libraries that do not conform to current SDK guidelines are being deprecated. While they might still function, they will no longer receive official support and updates. [18]","severity":"deprecated","affected_versions":"<15.0.0 (and generally older major versions)"}],"env_vars":null,"last_verified":"2026-04-06T00:00:00.000Z","next_check":"2026-07-05T00:00:00.000Z"}