Skip to content

Commit 4b0b1d5

Browse files
Abel Milashclaude
andcommitted
Add async package re-exports and apply doc fixes mirroring PR #165
Populate __all__ in aio, aio.models, and aio.operations __init__.py files so public symbols are importable directly from the package namespace. Update all async examples, README, and skill docs to use the shorter import paths. Add test_async_package_exports.py mirroring the sync test_package_exports.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 562e8b7 commit 4b0b1d5

24 files changed

Lines changed: 198 additions & 43 deletions

.claude/skills/dataverse-sdk-use/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ The SDK ships a full async client, `AsyncDataverseClient`, under `PowerPlatform.
595595
### Import
596596
```python
597597
from azure.identity.aio import DefaultAzureCredential
598-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
598+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
599599
```
600600

601601
### Client Initialization

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ pip install "PowerPlatform-Dataverse-Client[async]"
801801
```python
802802
import asyncio
803803
from azure.identity.aio import DefaultAzureCredential
804-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
804+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
805805

806806
async def main():
807807
async with DefaultAzureCredential() as credential:
@@ -819,8 +819,6 @@ async def main():
819819
asyncio.run(main())
820820
```
821821

822-
> **Note:** `InteractiveBrowserCredential` from `azure.identity` is sync-only and cannot be used directly with the async client. See [examples/aio/_auth.py](https://github.com/microsoft/PowerPlatform-DataverseClient-Python/blob/main/examples/aio/_auth.py) for an async wrapper.
823-
824822
### Standalone usage (without `async with`)
825823

826824
```python
@@ -867,7 +865,7 @@ batch = client.batch.new()
867865
batch.records.create("account", {"name": "Alpha"})
868866
batch.records.create("account", {"name": "Beta"})
869867
result = await batch.execute()
870-
print(f"Created {len(list(result.entity_ids))} records")
868+
print(f"Created {len(result.entity_ids)} records")
871869

872870
# Atomic changeset
873871
batch = client.batch.new()

examples/aio/advanced/alternate_keys_upsert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import asyncio
2525
import sys
2626

27-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
27+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
2828
from PowerPlatform.Dataverse.models.upsert import UpsertItem
2929
from pathlib import Path
3030

examples/aio/advanced/batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
2424
from _auth import AsyncInteractiveBrowserCredential
25-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
25+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
2626

2727

2828
async def main():

examples/aio/advanced/concurrency_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
7272
from _auth import AsyncInteractiveBrowserCredential
73-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
73+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
7474
from PowerPlatform.Dataverse.models.record import QueryResult
7575
from PowerPlatform.Dataverse.models.table_info import TableInfo
7676

examples/aio/advanced/dataframe_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
2525
from _auth import AsyncInteractiveBrowserCredential
2626

27-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
27+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
2828
from PowerPlatform.Dataverse.models.filters import col, raw
2929

3030

examples/aio/advanced/datascience_risk_assessment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
5858
from _auth import AsyncInteractiveBrowserCredential
5959

60-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
60+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
6161
from PowerPlatform.Dataverse.models.filters import col, raw
6262

6363
# -- Optional imports (graceful degradation if not installed) ------

examples/aio/advanced/fetchxml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
3636
from _auth import AsyncInteractiveBrowserCredential
37-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
37+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
3838
from PowerPlatform.Dataverse.core.errors import MetadataError
3939

4040

examples/aio/advanced/file_upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import traceback
2121
from pathlib import Path
2222

23-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
23+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
2424

2525
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
2626
from _auth import AsyncInteractiveBrowserCredential

examples/aio/advanced/prodev_quick_start.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
6161
from _auth import AsyncInteractiveBrowserCredential
6262

63-
from PowerPlatform.Dataverse.aio.async_client import AsyncDataverseClient
63+
from PowerPlatform.Dataverse.aio import AsyncDataverseClient
6464
from PowerPlatform.Dataverse.models.filters import col
6565

6666
# -- Table schema names --

0 commit comments

Comments
 (0)