Home / Class/ PageInfo Class — anthropic-sdk-python Architecture

PageInfo Class — anthropic-sdk-python Architecture

Architecture documentation for the PageInfo class in _base_client.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  7c07fcc0_f706_66c2_3896_279eabb44e16["PageInfo"]
  31e60ad8_cac8_652d_176d_4f7cf7dda1ad["_base_client.py"]
  7c07fcc0_f706_66c2_3896_279eabb44e16 -->|defined in| 31e60ad8_cac8_652d_176d_4f7cf7dda1ad
  6b4f4a8c_056d_37b4_85f7_661270d26da4["__init__()"]
  7c07fcc0_f706_66c2_3896_279eabb44e16 -->|method| 6b4f4a8c_056d_37b4_85f7_661270d26da4
  0af661b2_fc54_aad4_02f9_440b26e1db26["__repr__()"]
  7c07fcc0_f706_66c2_3896_279eabb44e16 -->|method| 0af661b2_fc54_aad4_02f9_440b26e1db26

Relationship Graph

Source Code

src/anthropic/_base_client.py lines 123–171

class PageInfo:
    """Stores the necessary information to build the request to retrieve the next page.

    Either `url` or `params` must be set.
    """

    url: URL | NotGiven
    params: Query | NotGiven
    json: Body | NotGiven

    @overload
    def __init__(
        self,
        *,
        url: URL,
    ) -> None: ...

    @overload
    def __init__(
        self,
        *,
        params: Query,
    ) -> None: ...

    @overload
    def __init__(
        self,
        *,
        json: Body,
    ) -> None: ...

    def __init__(
        self,
        *,
        url: URL | NotGiven = not_given,
        json: Body | NotGiven = not_given,
        params: Query | NotGiven = not_given,
    ) -> None:
        self.url = url
        self.json = json
        self.params = params

    @override
    def __repr__(self) -> str:
        if self.url:
            return f"{self.__class__.__name__}(url={self.url})"
        if self.json:
            return f"{self.__class__.__name__}(json={self.json})"
        return f"{self.__class__.__name__}(params={self.params})"

Frequently Asked Questions

What is the PageInfo class?
PageInfo is a class in the anthropic-sdk-python codebase, defined in src/anthropic/_base_client.py.
Where is PageInfo defined?
PageInfo is defined in src/anthropic/_base_client.py at line 123.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free