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 d01d8266_caa3_11ad_83a4_7560fbb7aa62["put()"] 3224f719_8046_78c8_59e1_47301a46ddd4["AsyncAPIClient"] d01d8266_caa3_11ad_83a4_7560fbb7aa62 -->|defined in| 3224f719_8046_78c8_59e1_47301a46ddd4 3eb4686b_7ea1_5338_7572_5a1df91005b0["put()"] 3eb4686b_7ea1_5338_7572_5a1df91005b0 -->|calls| d01d8266_caa3_11ad_83a4_7560fbb7aa62 3eb4686b_7ea1_5338_7572_5a1df91005b0["put()"] d01d8266_caa3_11ad_83a4_7560fbb7aa62 -->|calls| 3eb4686b_7ea1_5338_7572_5a1df91005b0 41e4dab8_bf10_15e9_1d57_2ba669f0414a["async_to_httpx_files()"] d01d8266_caa3_11ad_83a4_7560fbb7aa62 -->|calls| 41e4dab8_bf10_15e9_1d57_2ba669f0414a 4e74c968_63fc_ca6c_ccf4_c01326e7060e["construct()"] d01d8266_caa3_11ad_83a4_7560fbb7aa62 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e c21c2971_d83f_0afc_9811_0642b34cfcd3["request()"] d01d8266_caa3_11ad_83a4_7560fbb7aa62 -->|calls| c21c2971_d83f_0afc_9811_0642b34cfcd3 style d01d8266_caa3_11ad_83a4_7560fbb7aa62 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/_base_client.py lines 2025–2049
async def put(
self,
path: str,
*,
cast_to: Type[ResponseT],
body: Body | None = None,
content: AsyncBinaryTypes | 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=await async_to_httpx_files(files), **options
)
return await 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 2025.
What does put() call?
put() calls 4 function(s): async_to_httpx_files, construct, put, request.
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