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

PropertyInfo Class — anthropic-sdk-python Architecture

Architecture documentation for the PropertyInfo class in _transform.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  18d99a49_4382_cd7a_02f4_64185a5cf0c7["PropertyInfo"]
  17ea9c01_2df6_304d_71e2_31af17ed7395["_transform.py"]
  18d99a49_4382_cd7a_02f4_64185a5cf0c7 -->|defined in| 17ea9c01_2df6_304d_71e2_31af17ed7395
  795f0efe_9176_62be_c64e_c76f5cba6949["__init__()"]
  18d99a49_4382_cd7a_02f4_64185a5cf0c7 -->|method| 795f0efe_9176_62be_c64e_c76f5cba6949
  2ec573d0_a6c6_3316_7056_f547e2e4c434["__repr__()"]
  18d99a49_4382_cd7a_02f4_64185a5cf0c7 -->|method| 2ec573d0_a6c6_3316_7056_f547e2e4c434

Relationship Graph

Source Code

src/anthropic/_utils/_transform.py lines 44–75

class PropertyInfo:
    """Metadata class to be used in Annotated types to provide information about a given type.

    For example:

    class MyParams(TypedDict):
        account_holder_name: Annotated[str, PropertyInfo(alias='accountHolderName')]

    This means that {'account_holder_name': 'Robert'} will be transformed to {'accountHolderName': 'Robert'} before being sent to the API.
    """

    alias: str | None
    format: PropertyFormat | None
    format_template: str | None
    discriminator: str | None

    def __init__(
        self,
        *,
        alias: str | None = None,
        format: PropertyFormat | None = None,
        format_template: str | None = None,
        discriminator: str | None = None,
    ) -> None:
        self.alias = alias
        self.format = format
        self.format_template = format_template
        self.discriminator = discriminator

    @override
    def __repr__(self) -> str:
        return f"{self.__class__.__name__}(alias='{self.alias}', format={self.format}, format_template='{self.format_template}', discriminator='{self.discriminator}')"

Frequently Asked Questions

What is the PropertyInfo class?
PropertyInfo is a class in the anthropic-sdk-python codebase, defined in src/anthropic/_utils/_transform.py.
Where is PropertyInfo defined?
PropertyInfo is defined in src/anthropic/_utils/_transform.py at line 44.

Analyze Your Own Codebase

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

Try Supermodel Free