Skip to content

Commit 3fbd5b2

Browse files
committed
cleanup
1 parent 5c3ce76 commit 3fbd5b2

4 files changed

Lines changed: 6 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A minimal Python SDK to use Microsoft Dataverse as a database for Azure AI Found
55
- Read (SQL) — Execute read-only T‑SQL via the McpExecuteSqlQuery Custom API. Returns `list[dict]`.
66
- OData CRUD — Thin wrappers over Dataverse Web API (create/get/update/delete).
77
- Bulk create — Pass a list of records to `create(...)` to invoke the bound `CreateMultiple` action; returns `list[str]` of GUIDs. If `@odata.type` is absent the SDK resolves the logical name from metadata (cached).
8-
- Bulk update — Call `update_multiple(entity_set, records)` to invoke the bound `UpdateMultiple` action; returns nothing (transactional fire-and-forget). Each record must include the real primary key attribute (e.g. `accountid`).
8+
- Bulk update — Call `update_multiple(entity_set, records)` to invoke the bound `UpdateMultiple` action; returns nothing. Each record must include the real primary key attribute (e.g. `accountid`).
99
- Retrieve multiple (paging) — Generator-based `get_multiple(...)` that yields pages, supports `$top` and Prefer: `odata.maxpagesize` (`page_size`).
1010
- Metadata helpers — Create/inspect/delete simple custom tables (EntityDefinitions + Attributes).
1111
- Pandas helpers — Convenience DataFrame oriented wrappers for quick prototyping/notebooks.
@@ -135,7 +135,7 @@ print({"created_ids": ids})
135135

136136
## Bulk update (UpdateMultiple)
137137

138-
Use `update_multiple(entity_set, records)` for a transactional batch update. The method returns `None` regardless of service response; this avoids exposing inconsistent behavior across environments that may or may not emit updated IDs.
138+
Use `update_multiple(entity_set, records)` for a transactional batch update. The method returns `None`.
139139

140140
```python
141141
ids = client.create("accounts", [
@@ -283,7 +283,7 @@ VS Code Tasks
283283

284284
## Limitations / Future Work
285285
- No general-purpose OData batching, upsert, or association operations yet.
286-
- `DeleteMultiple` not yet exposed; `UpdateMultiple` is available but returns no IDs (fire-and-forget semantics in this SDK version).
286+
- `DeleteMultiple` not yet exposed.
287287
- Minimal retry policy in library (network-error only); examples include additional backoff for transient Dataverse consistency.
288288
- Entity naming conventions in Dataverse: for multi-create the SDK resolves logical names from entity set metadata.
289289

examples/quickstart.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,8 @@ def print_line_summaries(label: str, summaries: list[dict]) -> None:
305305
backoff_retry(lambda: client.update_multiple(entity_set, bulk_updates))
306306
print({"bulk_update_requested": len(bulk_updates), "bulk_update_completed": True})
307307
# Verify the updated count values by refetching the subset
308-
# (Individual gets keep the example simple and avoid crafting a complex $filter.)
309308
verification = []
310-
# Small delay to reduce risk of any brief replication delay (usually unnecessary)
309+
# Small delay to reduce risk of any brief replication delay
311310
time.sleep(1)
312311
for rid in subset:
313312
rec = backoff_retry(lambda rid=rid: client.get(entity_set, rid))

src/dataverse_sdk/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ def update_multiple(self, entity: str, records: List[Dict[str, Any]]) -> None:
123123
Returns
124124
-------
125125
None
126-
On success returns nothing. The underlying action does not reliably emit updated IDs across
127-
environments; for predictable semantics the SDK returns None.
126+
On success returns nothing.
128127
"""
129128
self._get_odata().update_multiple(entity, records)
130129
return None

src/dataverse_sdk/odata.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,7 @@ def update_multiple(self, entity_set: str, records: List[Dict[str, Any]]) -> Non
250250
headers = self._headers().copy()
251251
r = self._request("post", url, headers=headers, json=payload)
252252
r.raise_for_status()
253-
try:
254-
body = r.json() if r.text else {}
255-
except ValueError:
256-
body = {}
257-
# Intentionally ignore response content: no stable contract for IDs across environments.
253+
# Intentionally ignore response content: no stable contract for IDs across environments.
258254
return None
259255

260256
def delete(self, entity_set: str, key: str) -> None:

0 commit comments

Comments
 (0)