put() — anthropic-sdk-python Function Reference
Architecture documentation for the put() function in _base_client.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 3eb4686b_7ea1_5338_7572_5a1df91005b0["put()"] 4b46ed95_ff71_ea5d_7534_6929dc929bdb["SyncAPIClient"] 3eb4686b_7ea1_5338_7572_5a1df91005b0 -->|defined in| 4b46ed95_ff71_ea5d_7534_6929dc929bdb d01d8266_caa3_11ad_83a4_7560fbb7aa62["put()"] d01d8266_caa3_11ad_83a4_7560fbb7aa62 -->|calls| 3eb4686b_7ea1_5338_7572_5a1df91005b0 d01d8266_caa3_11ad_83a4_7560fbb7aa62["put()"] 3eb4686b_7ea1_5338_7572_5a1df91005b0 -->|calls| d01d8266_caa3_11ad_83a4_7560fbb7aa62 fe1e967b_1ba5_59ce_0b67_87ce63fe58e9["to_httpx_files()"] 3eb4686b_7ea1_5338_7572_5a1df91005b0 -->|calls| fe1e967b_1ba5_59ce_0b67_87ce63fe58e9 4e74c968_63fc_ca6c_ccf4_c01326e7060e["construct()"] 3eb4686b_7ea1_5338_7572_5a1df91005b0 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e 2cb1e2bf_1a02_d5ea_42a9_c0def162363a["request()"] 3eb4686b_7ea1_5338_7572_5a1df91005b0 -->|calls| 2cb1e2bf_1a02_d5ea_42a9_c0def162363a style 3eb4686b_7ea1_5338_7572_5a1df91005b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/_base_client.py lines 1392–1416
def put(
self,
path: str,
*,
cast_to: Type[ResponseT],
body: Body | None = None,
content: BinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
if body is not None and content is not None:
raise TypeError("Passing both `body` and `content` is not supported")
if files is not None and content is not None:
raise TypeError("Passing both `files` and `content` is not supported")
if isinstance(body, bytes):
warnings.warn(
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
"Please pass raw bytes via the `content` parameter instead.",
DeprecationWarning,
stacklevel=2,
)
opts = FinalRequestOptions.construct(
method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
)
return self.request(cast_to, opts)
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does put() do?
put() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/_base_client.py.
Where is put() defined?
put() is defined in src/anthropic/_base_client.py at line 1392.
What does put() call?
put() calls 4 function(s): construct, put, request, to_httpx_files.
What calls put()?
put() is called by 1 function(s): put.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free