Skip to content

Commit bd5364d

Browse files
Merge pull request #33 from microsoft/users/zhaodongwang/updateReadme
Refactor configuration instructions in README
2 parents fe72421 + 6843a04 commit bd5364d

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +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

2626
Auth:
27-
- Accept only an `azure.core.credentials.TokenCredential` credential.
27+
- Accept only an `azure.core.credentials.TokenCredential` credential. See full supported list at https://learn.microsoft.com/en-us/dotnet/api/azure.core.tokencredential?view=azure-dotnet.
2828
- Token scope used by the SDK: `https://<yourorg>.crm.dynamics.com/.default` (derived from `base_url`).
2929

3030
## API Reference (Summary)
@@ -73,21 +73,16 @@ Direct TDS via ODBC is not used; SQL reads are executed via the Web API using th
7373
## Configuration Notes
7474

7575
- For Web API (OData), tokens target your Dataverse org URL scope: https://yourorg.crm.dynamics.com/.default. The SDK requests this scope from the provided TokenCredential.
76-
(Preprod environments may surface newest SQL subset capabilities sooner than production.)
7776

78-
### Configuration (DataverseConfig)
79-
80-
Pass a `DataverseConfig` or rely on sane defaults:
77+
### Configuration
8178

8279
```python
80+
from azure.identity import InteractiveBrowserCredential
8381
from dataverse_sdk import DataverseClient
84-
from dataverse_sdk.config import DataverseConfig
85-
86-
cfg = DataverseConfig() # defaults: language_code=1033
87-
client = DataverseClient(base_url="https://yourorg.crm.dynamics.com", config=cfg)
8882

89-
# Optional HTTP tunables (timeouts/retries)
90-
# cfg.http_retries, cfg.http_backoff, cfg.http_timeout
83+
base_url = "https://yourorg.crm.dynamics.com"
84+
credential = InteractiveBrowserCredential() # or DeviceCodeCredential(), ClientSecretCredential(...), etc.
85+
client = DataverseClient(base_url=base_url, credential=credential)
9186
```
9287

9388
## Quickstart

0 commit comments

Comments
 (0)