You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/includes/create-project-fdp.md
+23-19Lines changed: 23 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,26 @@ Use the following tabs to select the method you plan to use to create a [!INCLUD
46
46
- You must be **Owner** of the subscription to receive the appropriate access control needed to use the project.
47
47
-[Set up your development environment](../how-to/develop/install-cli-sdk.md?tabs=python)
48
48
- Authenticate with `az login` or `az login --use-device-code` in your environment before running code.
49
+
- Complete these steps to start your Python script:
50
+
1. Install packages: `pip install azure-identity azure-mgmt-cognitiveservices`. If in a notebook cell, use `%pip install azure-identity azure-mgmt-cognitiveservices`.
51
+
1. Use `pip show azure-mgmt-cognitiveservices` to verify your version is 13.7 or greater.
52
+
1. Start your script with the following code to create the `client` connection and variables used throughout this article. This example creates the project in West US:
53
+
54
+
```python
55
+
from azure.identity import DefaultAzureCredential
56
+
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
57
+
58
+
sub_id ='your-sub'
59
+
rgp ='your-resource-group'
60
+
resource_name ='your-resource'
61
+
project_name ='your-project'
62
+
location ='westus'
63
+
64
+
client = CognitiveServicesManagementClient(
65
+
credential=DefaultAzureCredential(),
66
+
subscription_id=sub_id,
67
+
api_version="2025-04-01-preview"
68
+
)
49
69
50
70
51
71
# [Azure CLI](#tab/azurecli)
@@ -97,27 +117,11 @@ To customize the settings for your project, follow these steps:
97
117
98
118
To create a [!INCLUDE [fdp](../includes/fdp-project-name.md)]:
99
119
100
-
1. Install packages: `pip install azure-identity azure-mgmt-cognitiveservices`. If in a notebook cell, use `%pip install azure-identity azure-mgmt-cognitiveservices`.
101
-
1. Use `pip show azure-mgmt-cognitiveservices` to verify your version is 13.7 or greater.
102
-
1. Use the following code to create a [!INCLUDE [fdp-project-name](../includes/fdp-project-name.md)]. This example creates the project in West US:
120
+
121
+
1. Add this code to create a [!INCLUDE [fdp-project-name](../includes/fdp-project-name.md)], using the variables and`client` connection from the [Prerequisites](#prerequisites).
103
122
104
123
```python
105
-
from azure.identity import DefaultAzureCredential
106
-
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
0 commit comments