@@ -24,8 +24,7 @@ A Python package allowing developers to connect to Dataverse environments for DD
2424- Optional pandas integration (` PandasODataClient ` ) for DataFrame based create / get / query.
2525
2626Auth:
27- - Credential is optional; if omitted, the SDK uses ` DefaultAzureCredential ` .
28- - You can pass any ` azure.core.credentials.TokenCredential ` you prefer; examples use ` InteractiveBrowserCredential ` for local runs.
27+ - Accept only an ` azure.core.credentials.TokenCredential ` credential.
2928- Token scope used by the SDK: ` https://<yourorg>.crm.dynamics.com/.default ` (derived from ` base_url ` ).
3029
3130## API Reference (Summary)
@@ -111,21 +110,13 @@ For upload files functionalities, run quickstart_file_upload.py instead
111110
112111### DataverseClient (recommended)
113112
114- Tip: You can omit the credential and the SDK will use ` DefaultAzureCredential ` automatically:
115-
116113``` python
114+ from azure.identity import InteractiveBrowserCredential
117115from dataverse_sdk import DataverseClient
118116
119117base_url = " https://yourorg.crm.dynamics.com"
120- client = DataverseClient(base_url = base_url) # uses DefaultAzureCredential by default
121- ```
122-
123- ``` python
124- from azure.identity import DefaultAzureCredential
125- from dataverse_sdk import DataverseClient
126-
127- base_url = " https://yourorg.crm.dynamics.com"
128- client = DataverseClient(base_url = base_url, credential = DefaultAzureCredential())
118+ credential = InteractiveBrowserCredential() # or DeviceCodeCredential(), ClientSecretCredential(...), etc.
119+ client = DataverseClient(base_url = base_url, credential = credential)
129120
130121# Create (returns list[str] of new GUIDs)
131122account_id = client.create(" account" , {" name" : " Acme, Inc." , " telephone1" : " 555-0100" })[0 ]
@@ -165,9 +156,9 @@ Pass a list of payloads to `create(logical_name, payloads)` to invoke the collec
165156```python
166157# Bulk create accounts (returns list of GUIDs)
167158payloads = [
168- {" name" : " Contoso" },
169- {" name" : " Fabrikam" },
170- {" name" : " Northwind" },
159+ {" name" : " Contoso" },
160+ {" name" : " Fabrikam" },
161+ {" name" : " Northwind" },
171162]
172163ids = client.create(" account" , payloads)
173164assert isinstance (ids, list ) and all (isinstance (x, str ) for x in ids)
0 commit comments