Home / Function/ _set_private_attributes() — anthropic-sdk-python Function Reference

_set_private_attributes() — anthropic-sdk-python Function Reference

Architecture documentation for the _set_private_attributes() function in _base_client.py from the anthropic-sdk-python codebase.

Function python AnthropicClient SyncAPI calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  e150825c_d273_74d9_8c92_a32cb6cd5ef0["_set_private_attributes()"]
  c0f008e5_ad6e_1b9d_0800_826eae176f95["BaseSyncPage"]
  e150825c_d273_74d9_8c92_a32cb6cd5ef0 -->|defined in| c0f008e5_ad6e_1b9d_0800_826eae176f95
  8020c6f2_f57e_e98f_ae36_1d4aacd2956d["_set_private_attributes()"]
  8020c6f2_f57e_e98f_ae36_1d4aacd2956d -->|calls| e150825c_d273_74d9_8c92_a32cb6cd5ef0
  fd93a81d_e05c_b682_aed9_45b0ae941ae3["_request_api_list()"]
  fd93a81d_e05c_b682_aed9_45b0ae941ae3 -->|calls| e150825c_d273_74d9_8c92_a32cb6cd5ef0
  8020c6f2_f57e_e98f_ae36_1d4aacd2956d["_set_private_attributes()"]
  e150825c_d273_74d9_8c92_a32cb6cd5ef0 -->|calls| 8020c6f2_f57e_e98f_ae36_1d4aacd2956d
  style e150825c_d273_74d9_8c92_a32cb6cd5ef0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/_base_client.py lines 238–249

    def _set_private_attributes(
        self,
        client: SyncAPIClient,
        model: Type[_T],
        options: FinalRequestOptions,
    ) -> None:
        if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
            self.__pydantic_private__ = {}

        self._model = model
        self._client = client
        self._options = options

Subdomains

Frequently Asked Questions

What does _set_private_attributes() do?
_set_private_attributes() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/_base_client.py.
Where is _set_private_attributes() defined?
_set_private_attributes() is defined in src/anthropic/_base_client.py at line 238.
What does _set_private_attributes() call?
_set_private_attributes() calls 1 function(s): _set_private_attributes.
What calls _set_private_attributes()?
_set_private_attributes() is called by 2 function(s): _request_api_list, _set_private_attributes.

Analyze Your Own Codebase

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

Try Supermodel Free