MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / patch

Method patch

src/anthropic/_base_client.py:2475–2497  ·  view source on GitHub ↗
(
        self,
        path: str,
        *,
        cast_to: Type[ResponseT],
        body: Body | None = None,
        content: AsyncBinaryTypes | None = None,
        files: RequestFiles | None = None,
        options: RequestOptions = {},
    )

Source from the content-addressed store, hash-verified

2473 return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
2474
2475 async def patch(
2476 self,
2477 path: str,
2478 *,
2479 cast_to: Type[ResponseT],
2480 body: Body | None = None,
2481 content: AsyncBinaryTypes | None = None,
2482 files: RequestFiles | None = None,
2483 options: RequestOptions = {},
2484 ) -> ResponseT:
2485 if body is not None and content is not None:
2486 raise TypeError("Passing both `body` and `content` is not supported")
2487 if files is not None and content is not None:
2488 raise TypeError("Passing both `files` and `content` is not supported")
2489 opts = FinalRequestOptions.construct(
2490 method="patch",
2491 url=path,
2492 json_data=body,
2493 content=content,
2494 files=await async_to_httpx_files(files),
2495 **options,
2496 )
2497 return await self.request(cast_to, opts)
2498
2499 async def put(
2500 self,

Callers

nothing calls this directly

Calls 3

requestMethod · 0.95
async_to_httpx_filesFunction · 0.85
constructMethod · 0.45

Tested by

no test coverage detected