Registry / azure / azure-ai-projects

azure-ai-projects

JSON →
library2.5.0pypypi✓ verified 25d ago

The Azure AI Projects Client Library for Python provides client access to manage Azure AI Studio resources, including projects, connections, and deployments. It is currently at version 2.0.1 and is actively developed by Microsoft, with regular updates to support new Azure AI Studio features and API versions.

pip install azure-ai-projects azure-identity
INSTALL
IMPORT
SIG · AZURE-AI-PROJECTS
A
azure-ai-projects
azurepythonv2.5.0
Install
7.9s avg
Import
Disk
87MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.5.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.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 86.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.9s · import 0.000s · 86MB
87MB installed
● package 87MB
Code
Verified usage

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

AIStudioClient
from azure.ai.projects import AIStudioClient
DefaultAzureCredential
from azure.identity import DefaultAzureCredential
Standard Azure SDK authentication class, common for all Azure services.

This quickstart demonstrates how to authenticate with Azure AI Studio using `DefaultAzureCredential` and list AI projects within a specified resource group. Ensure your environment is configured for Azure authentication (e.g., `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`, or logged in via Azure CLI).

import os from azure.identity import DefaultAzureCredential from azure.ai.projects import AIStudioClient # Replace with your Azure Subscription ID and Resource Group Name subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "YOUR_SUBSCRIPTION_ID") resource_group_name = os.environ.get("AZURE_RESOURCE_GROUP", "YOUR_RESOURCE_GROUP_NAME") project_name = os.environ.get("AZURE_AI_PROJECT_NAME", "my-ai-project") try: # Authenticate using DefaultAzureCredential # This will try various methods: environment variables, managed identity, Azure CLI, etc. credential = DefaultAzureCredential() # Create a client for Azure AI Studio Projects client = AIStudioClient( credential=credential, subscription_id=subscription_id, resource_group_name=resource_group_name, ) # List projects within the specified resource group print(f"Listing projects in resource group '{resource_group_name}'...") projects_iterator = client.projects.list(resource_group_name=resource_group_name) for project in projects_iterator: print(f"- Project Name: {project.name}, Location: {project.location}") # Example: Get a specific project (if it exists) # Make sure 'project_name' exists in your resource group # project = client.projects.get(project_name=project_name) # print(f"\nRetrieved project: {project.name}, ID: {project.id}") except Exception as e: print(f"An error occurred: {e}") print("Please ensure AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, and other necessary credentials are set.")
Debug
Known issues
breakingVersion 2.0.0 introduced significant API changes and a new design for interacting with Azure AI Studio. Code written for 1.x versions will likely require substantial updates.
fix
Refer to the official Azure SDK documentation and samples for version 2.x. Key classes and methods have changed their signatures and object models. Migrate to the new `AIStudioClient` and its associated operations.
affects: 2.0.0 and later
gotchaAuthentication requires proper setup for `DefaultAzureCredential`. Without correct environment variables or Azure CLI login, the client will fail to authenticate.
fix
Ensure `AZURE_SUBSCRIPTION_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET` environment variables are set, or that you are logged in via `az login` with the Azure CLI. If using Managed Identity, ensure the identity has the necessary roles (e.g., 'Contributor' or specific AI Studio roles).
affects: All versions
gotchaOperations often require context like `subscription_id` and `resource_group_name` for client initialization, and potentially the specific AI Studio project name for resource-specific actions.
fix
Always provide the correct `subscription_id` and `resource_group_name` when initializing the `AIStudioClient`. For operations on specific resources, ensure you pass the correct resource name or ID as arguments.
affects: All versions
Upgrade
Version history
2.5.0latest on PyPI · released Aug 20, 2026
Audit
Dependencies
azure-identityrequiredRequired for authentication with Azure services (e.g., DefaultAzureCredential).
Agent activity
43 hits · last 30 days
node
34
Amazon
1
OpenAI (training)
1
Resources
azure-ai-projects — pip install azure-ai-projects · libregistry