SyncPageCursor Class — anthropic-sdk-python Architecture
Architecture documentation for the SyncPageCursor class in pagination.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD ca09d94c_c69e_3df8_c44a_327c5fc4ef90["SyncPageCursor"] b906442a_92b7_2131_d6a5_3712533b82f2["pagination.py"] ca09d94c_c69e_3df8_c44a_327c5fc4ef90 -->|defined in| b906442a_92b7_2131_d6a5_3712533b82f2 e4b79dfd_425a_da9c_cc0c_cbec5af61d5d["_get_page_items()"] ca09d94c_c69e_3df8_c44a_327c5fc4ef90 -->|method| e4b79dfd_425a_da9c_cc0c_cbec5af61d5d 500c3070_5dd3_c0c1_bd39_5de6c1fcfb2a["has_next_page()"] ca09d94c_c69e_3df8_c44a_327c5fc4ef90 -->|method| 500c3070_5dd3_c0c1_bd39_5de6c1fcfb2a a4e2ad92_26d1_92f3_3faf_a20a5b2288de["next_page_info()"] ca09d94c_c69e_3df8_c44a_327c5fc4ef90 -->|method| a4e2ad92_26d1_92f3_3faf_a20a5b2288de
Relationship Graph
Source Code
src/anthropic/pagination.py lines 145–171
class SyncPageCursor(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
data: List[_T]
has_more: Optional[bool] = None
next_page: Optional[str] = None
@override
def _get_page_items(self) -> List[_T]:
data = self.data
if not data:
return []
return data
@override
def has_next_page(self) -> bool:
has_more = self.has_more
if has_more is not None and has_more is False:
return False
return super().has_next_page()
@override
def next_page_info(self) -> Optional[PageInfo]:
next_page = self.next_page
if not next_page:
return None
return PageInfo(params={"page": next_page})
Domain
Defined In
Source
Frequently Asked Questions
What is the SyncPageCursor class?
SyncPageCursor is a class in the anthropic-sdk-python codebase, defined in src/anthropic/pagination.py.
Where is SyncPageCursor defined?
SyncPageCursor is defined in src/anthropic/pagination.py at line 145.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free