[MCC-1496700] Python get_datasets() pagination support#29
Merged
Conversation
butsyk-mdsol
requested review from
afieraru-mdsol,
dsilaghi-mdsol and
ibaig-mdsol
May 12, 2026 13:41
There was a problem hiding this comment.
Pull request overview
Adds pagination support to the Python SDK’s get_datasets() call by returning a structured paginated response (items + pagination metadata) instead of a plain list, and updates the public API exports and README example accordingly.
Changes:
- Change
get_datasets()return type toPaginatedResponse[Dataset]across the service interface, default implementation, and client façade. - Build and return pagination metadata (
total_records,page,page_size,total_pages) from the transport results in the default service. - Update README quick-start usage and export
PaginatedResponse/Paginationfrom the package root.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates quick-start example to use the paginated response (.items). |
| dataconnect/service/default.py | Implements PaginatedResponse construction and pagination metadata for get_datasets(). |
| dataconnect/service/base.py | Updates service interface return type for get_datasets() to PaginatedResponse[Dataset]. |
| dataconnect/client.py | Updates public client get_datasets() signature/return type to PaginatedResponse[Dataset]. |
| dataconnect/init.py | Exposes PaginatedResponse and Pagination in the public package API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
butsyk-mdsol
force-pushed
the
features/MCC-1496700
branch
from
May 12, 2026 13:53
398822f to
61db02c
Compare
dsilaghi-mdsol
previously approved these changes
May 12, 2026
butsyk-mdsol
force-pushed
the
features/MCC-1496700
branch
from
May 12, 2026 13:57
61db02c to
8bcbf95
Compare
dsilaghi-mdsol
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feature/bug/enhance/refactor/tech_debt/hotfix
Python get_datasets() pagination support.MCC-1496700Checklist
git commit --amend --no-editcommand to reduce commit messages when making small file changes (like changing linespacing).tests/folder.doc/folder.Changes Summary
AC-06: Pagination Input Parameters
The function accepts optional page (default: 1) and page_size (default: TBD) parameters to control result pagination.
AC-07: Result Set Metadata
The response object includes full pagination context
response = {
"total_records": int, # Total count of available datasets
"pagination":
{ "page": int, # Current page (user-provided or default) "page_size": int, # Page size (user-provided or default) "total_pages": int# Calculated: ceil(total_records / page_size) },
"items": [] # List of Dataset objects
}
Deployment Notes
In addition to IAC/code, add any notes for reviewer should know.