Skip to content

Commit 8ec6e2e

Browse files
author
Max Wang
committed
stash
1 parent cb1d79e commit 8ec6e2e

23 files changed

Lines changed: 54 additions & 54 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ The client raises structured exceptions for different error scenarios:
288288

289289
```python
290290
from PowerPlatform.Dataverse import DataverseClient
291-
from PowerPlatform.Dataverse.core.errors import HttpError, ValidationError
291+
from PowerPlatform.Dataverse._core.errors import HttpError, ValidationError
292292

293293
try:
294294
client.get("account", "invalid-id")

examples/advanced/pandas_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# sys.path.append(str(Path(__file__).resolve().parents[2] / "src"))
2424

2525
from PowerPlatform.Dataverse import DataverseClient
26-
from PowerPlatform.Dataverse.utils.pandas_adapter import PandasODataClient
26+
from PowerPlatform.Dataverse._utils.pandas_adapter import PandasODataClient
2727
from azure.identity import InteractiveBrowserCredential
2828
import traceback
2929
import requests

examples/basic/functional_testing.py

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

3232
# Import SDK components (assumes installation is already validated)
3333
from PowerPlatform.Dataverse import DataverseClient
34-
from PowerPlatform.Dataverse.core.errors import HttpError, MetadataError
34+
from PowerPlatform.Dataverse._core.errors import HttpError, MetadataError
3535
from azure.identity import InteractiveBrowserCredential
3636

3737

examples/basic/installation_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ def validate_imports():
7373
print(f" ✅ DataverseClient class: {DataverseClient}")
7474

7575
# Test submodule imports
76-
from PowerPlatform.Dataverse.core.errors import HttpError, MetadataError
76+
from PowerPlatform.Dataverse._core.errors import HttpError, MetadataError
7777
print(f" ✅ Core errors: HttpError, MetadataError")
7878

79-
from PowerPlatform.Dataverse.core.config import DataverseConfig
79+
from PowerPlatform.Dataverse._core.config import DataverseConfig
8080
print(f" ✅ Core config: DataverseConfig")
8181

82-
from PowerPlatform.Dataverse.utils.pandas_adapter import PandasODataClient
82+
from PowerPlatform.Dataverse._utils.pandas_adapter import PandasODataClient
8383
print(f" ✅ Utils: PandasODataClient")
8484

85-
from PowerPlatform.Dataverse.data.odata import ODataClient
85+
from PowerPlatform.Dataverse._data.odata import ODataClient
8686
print(f" ✅ Data layer: ODataClient")
8787

8888
# Test Azure Identity import
File renamed without changes.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT license.
33

4-
from __future__ import annotations
5-
64
"""
75
Authentication helpers for Dataverse.
86
9-
This module provides :class:`~PowerPlatform.Dataverse.core.auth.AuthManager`, a thin wrapper over any Azure Identity
10-
``TokenCredential`` for acquiring OAuth2 access tokens, and :class:`~PowerPlatform.Dataverse.core.auth.TokenPair` for
7+
This module provides :class:`~PowerPlatform.Dataverse._core.auth.AuthManager`, a thin wrapper over any Azure Identity
8+
``TokenCredential`` for acquiring OAuth2 access tokens, and :class:`~PowerPlatform.Dataverse._core.auth.TokenPair` for
119
storing the acquired token alongside its scope.
1210
"""
1311

12+
from __future__ import annotations
13+
1414
from dataclasses import dataclass
1515

1616
from azure.core.credentials import TokenCredential
@@ -22,9 +22,9 @@ class TokenPair:
2222
Container for an OAuth2 access token and its associated resource scope.
2323
2424
:param resource: The OAuth2 scope/resource for which the token was acquired.
25-
:type resource: ``str``
25+
:type resource: :class:`str`
2626
:param access_token: The access token string.
27-
:type access_token: ``str``
27+
:type access_token: :class:`str`
2828
"""
2929
resource: str
3030
access_token: str
@@ -53,7 +53,7 @@ def acquire_token(self, scope: str) -> TokenPair:
5353
:param scope: OAuth2 scope string, typically ``"https://<org>.crm.dynamics.com/.default"``.
5454
:type scope: ``str``
5555
:return: Token pair containing the scope and access token.
56-
:rtype: ~PowerPlatform.Dataverse.core.auth.TokenPair
56+
:rtype: ~PowerPlatform.Dataverse._core.auth.TokenPair
5757
:raises ~azure.core.exceptions.ClientAuthenticationError: If token acquisition fails.
5858
"""
5959
token = self.credential.get_token(scope)

src/PowerPlatform/Dataverse/core/config.py renamed to src/PowerPlatform/Dataverse/_core/config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT license.
33

4-
from __future__ import annotations
5-
64
"""
75
Dataverse client configuration.
86
9-
Provides :class:`~PowerPlatform.Dataverse.core.config.DataverseConfig`, a lightweight
7+
Provides :class:`~PowerPlatform.Dataverse._core.config.DataverseConfig`, a lightweight
108
immutable container for locale and (reserved) HTTP tuning options plus the
11-
convenience constructor :meth:`~PowerPlatform.Dataverse.core.config.DataverseConfig.from_env`.
9+
convenience constructor :meth:`~PowerPlatform.Dataverse._core.config.DataverseConfig.from_env`.
1210
"""
1311

12+
from __future__ import annotations
13+
1414
from dataclasses import dataclass
1515
from typing import Optional
1616

@@ -42,7 +42,7 @@ def from_env(cls) -> "DataverseConfig":
4242
Create a configuration instance with default settings.
4343
4444
:return: Configuration instance with default values.
45-
:rtype: ~PowerPlatform.Dataverse.core.config.DataverseConfig
45+
:rtype: ~PowerPlatform.Dataverse._core.config.DataverseConfig
4646
"""
4747
# Environment-free defaults
4848
return cls(
File renamed without changes.

src/PowerPlatform/Dataverse/core/errors.py renamed to src/PowerPlatform/Dataverse/_core/errors.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"""
55
Structured Dataverse exception hierarchy.
66
7-
This module provides :class:`~PowerPlatform.Dataverse.core.errors.DataverseError` and
8-
specialized :class:`~PowerPlatform.Dataverse.core.errors.ValidationError`,
9-
:class:`~PowerPlatform.Dataverse.core.errors.MetadataError`,
10-
:class:`~PowerPlatform.Dataverse.core.errors.SQLParseError`, and
11-
:class:`~PowerPlatform.Dataverse.core.errors.HttpError` for validation, metadata,
7+
This module provides :class:`~PowerPlatform.Dataverse._core.errors.DataverseError` and
8+
specialized :class:`~PowerPlatform.Dataverse._core.errors.ValidationError`,
9+
:class:`~PowerPlatform.Dataverse._core.errors.MetadataError`,
10+
:class:`~PowerPlatform.Dataverse._core.errors.SQLParseError`, and
11+
:class:`~PowerPlatform.Dataverse._core.errors.HttpError` for validation, metadata,
1212
SQL parsing, and Web API HTTP failures.
1313
"""
1414

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
HTTP client with automatic retry logic and timeout handling.
66
7-
This module provides :class:`~PowerPlatform.Dataverse.core.http.HttpClient`, a wrapper
7+
This module provides :class:`~PowerPlatform.Dataverse._core.http.HttpClient`, a wrapper
88
around the requests library that adds configurable retry behavior for transient
99
network errors and intelligent timeout management based on HTTP method types.
1010
"""

0 commit comments

Comments
 (0)