Skip to content

Unified interface for create/update/delete#16

Merged
zhaodongwang-msft merged 2 commits intomainfrom
user/tpellissier/crud-overloads
Oct 11, 2025
Merged

Unified interface for create/update/delete#16
zhaodongwang-msft merged 2 commits intomainfrom
user/tpellissier/crud-overloads

Conversation

@tpellissier-msft
Copy link
Copy Markdown
Contributor

Copilot summary:

This pull request introduces a unified and simplified CRUD API for the Python SDK, focusing on making single and bulk operations consistent and easier to use. The changes update the documentation, examples, and core implementation so that create, update, and delete methods now have unified signatures and return types. Bulk operations are now handled through these unified methods, and return semantics are consistent (e.g., create always returns a list of GUIDs, and update/delete always return None). The documentation and quickstart examples have been updated to reflect these changes.

Unified CRUD API and documentation updates:

  • The DataverseClient class now exposes unified create, update, and delete methods that handle both single and bulk operations, replacing the previous update_multiple and changing return types for consistency. (src/dataverse_sdk/client.py)
  • The SDK documentation in README.md has been extensively revised to describe the new API, including updated method signatures, return types, usage guidelines, and examples for single and bulk operations. (README.md) [1] [2] [3] [4] [5] [6] [7] [8]

Example and quickstart updates:

  • The quickstart example in examples/quickstart.py has been updated to use the new API, demonstrating the unified create, update, and bulk update patterns, and reflecting the new return types and workflows. (examples/quickstart.py) [1] [2] [3]

Implementation details and internal consistency:

  • The low-level ODataClient.create method now returns only GUID strings for single creates, not full entity representations, aligning with the new API contract. (src/dataverse_sdk/odata.py) [1] [2]
  • Internal logic for GUID validation has been added to support the new return types and ensure proper handling of IDs. (src/dataverse_sdk/odata.py)

These changes make the SDK easier to use for both single and bulk operations, improve performance by avoiding unnecessary data fetching, and ensure the documentation and examples are aligned with the updated API.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread tests/test_create_single_guid.py
Comment thread src/dataverse_sdk/odata.py
Comment thread src/dataverse_sdk/client.py Outdated
Comment thread src/dataverse_sdk/odata.py Outdated
Comment thread src/dataverse_sdk/client.py
@zhaodongwang-msft zhaodongwang-msft merged commit 8fcba62 into main Oct 11, 2025
2 checks passed
@zhaodongwang-msft zhaodongwang-msft deleted the user/tpellissier/crud-overloads branch February 13, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants