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

Method patch

src/anthropic/_base_client.py:2467–2489  ·  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

2465 return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
2466
2467 async def patch(
2468 self,
2469 path: str,
2470 *,
2471 cast_to: Type[ResponseT],
2472 body: Body | None = None,
2473 content: AsyncBinaryTypes | None = None,
2474 files: RequestFiles | None = None,
2475 options: RequestOptions = {},
2476 ) -> ResponseT:
2477 if body is not None and content is not None:
2478 raise TypeError("Passing both `body` and `content` is not supported")
2479 if files is not None and content is not None:
2480 raise TypeError("Passing both `files` and `content` is not supported")
2481 opts = FinalRequestOptions.construct(
2482 method="patch",
2483 url=path,
2484 json_data=body,
2485 content=content,
2486 files=await async_to_httpx_files(files),
2487 **options,
2488 )
2489 return await self.request(cast_to, opts)
2490
2491 async def put(
2492 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