Python SDK : all Page* response classes extend Pageable[T] for a consistent developer experience
Raphael Derbier
Product Feedback: Inconsistent Pagination API in Python Client
While working a Dgraph connector to sync Istari data, I found an inconsistency in how pagination works across different list_* methods in the Python client:
Some Page* classes extend the Pageable[T] base class (which provides iter_items() and iter_pages() helper methods),
while others are plain BaseModel with the same fields but no iteration helpers.
Example
auto-paginates through all files -> OK
for file in client.list_files(size=50).iter_items():
process(file)
This fails - PageAgent has no iter_items()
for agent in client.list_agents(size=50).iter_items(): # AttributeError!
process(agent)
Enhancement Request:
Could we ensure all Page* response classes extend Pageable[T] for a consistent developer experience?
This would allow the same iteration pattern across all list endpoints.