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

copy() — anthropic-sdk-python Function Reference

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

Function python AnthropicClient SyncAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  d3b3784f_6eb4_9b89_67bf_1c44be1fabfb["copy()"]
  ba122576_d069_c004_c1f5_107e86c806e6["AsyncAnthropicFoundry"]
  d3b3784f_6eb4_9b89_67bf_1c44be1fabfb -->|defined in| ba122576_d069_c004_c1f5_107e86c806e6
  b88e2fc1_7080_57ed_a433_14a6f7486030["copy()"]
  b88e2fc1_7080_57ed_a433_14a6f7486030 -->|calls| d3b3784f_6eb4_9b89_67bf_1c44be1fabfb
  b88e2fc1_7080_57ed_a433_14a6f7486030["copy()"]
  d3b3784f_6eb4_9b89_67bf_1c44be1fabfb -->|calls| b88e2fc1_7080_57ed_a433_14a6f7486030
  style d3b3784f_6eb4_9b89_67bf_1c44be1fabfb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/lib/foundry.py lines 372–406

    def copy(
        self,
        *,
        api_key: str | None = None,
        azure_ad_token_provider: AsyncAzureADTokenProvider | None = None,
        auth_token: str | None = None,
        base_url: str | httpx.URL | None = None,
        timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
        http_client: httpx.AsyncClient | None = None,
        max_retries: int | NotGiven = NOT_GIVEN,
        default_headers: Mapping[str, str] | None = None,
        set_default_headers: Mapping[str, str] | None = None,
        default_query: Mapping[str, object] | None = None,
        set_default_query: Mapping[str, object] | None = None,
        _extra_kwargs: Mapping[str, Any] = {},
    ) -> Self:
        """
        Create a new client instance re-using the same options given to the current client with optional overriding.
        """
        return super().copy(
            api_key=api_key,
            auth_token=auth_token,
            base_url=base_url,
            timeout=timeout,
            http_client=http_client,
            max_retries=max_retries,
            default_headers=default_headers,
            set_default_headers=set_default_headers,
            default_query=default_query,
            set_default_query=set_default_query,
            _extra_kwargs={
                "azure_ad_token_provider": azure_ad_token_provider or self._azure_ad_token_provider,
                **_extra_kwargs,
            },
        )

Subdomains

Calls

Called By

Frequently Asked Questions

What does copy() do?
copy() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/foundry.py.
Where is copy() defined?
copy() is defined in src/anthropic/lib/foundry.py at line 372.
What does copy() call?
copy() calls 1 function(s): copy.
What calls copy()?
copy() is called by 1 function(s): copy.

Analyze Your Own Codebase

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

Try Supermodel Free