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

UserLocation Class — anthropic-sdk-python Architecture

Architecture documentation for the UserLocation class in web_search_tool_20250305_param.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  1a2e04c0_beb9_19b5_4d54_cf332186992d["UserLocation"]
  1803970f_f89e_9dee_2cec_267d05b0b743["web_search_tool_20250305_param.py"]
  1a2e04c0_beb9_19b5_4d54_cf332186992d -->|defined in| 1803970f_f89e_9dee_2cec_267d05b0b743

Relationship Graph

Source Code

src/anthropic/types/web_search_tool_20250305_param.py lines 14–36

class UserLocation(TypedDict, total=False):
    """Parameters for the user's location.

    Used to provide more relevant search results.
    """

    type: Required[Literal["approximate"]]

    city: Optional[str]
    """The city of the user."""

    country: Optional[str]
    """
    The two letter
    [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
    user.
    """

    region: Optional[str]
    """The region of the user."""

    timezone: Optional[str]
    """The [IANA timezone](https://nodatime.org/TimeZones) of the user."""

Frequently Asked Questions

What is the UserLocation class?
UserLocation is a class in the anthropic-sdk-python codebase, defined in src/anthropic/types/web_search_tool_20250305_param.py.
Where is UserLocation defined?
UserLocation is defined in src/anthropic/types/web_search_tool_20250305_param.py at line 14.

Analyze Your Own Codebase

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

Try Supermodel Free