Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
4,911 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
4,911
◇
Types & classes
1,594
↳
Endpoints
26
Method
_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/vertex/_client.py:155
Method
_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/vertex/_client.py:319
Method
_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/google_cloud/_client.py:340
Method
_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/google_cloud/_client.py:579
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/bedrock/_mantle.py:459
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/bedrock/_client.py:219
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/bedrock/_client.py:399
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/aws/_client.py:145
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/aws/_client.py:353
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/vertex/_client.py:159
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/vertex/_client.py:323
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/google_cloud/_client.py:353
Method
_prepare_request
(self, request: httpx.Request)
src/anthropic/lib/google_cloud/_client.py:592
Function
_quote_fragment_part
Percent-encode `value` for use in a URI fragment. Considers characters not in `fragment` set from RFC 3986 §3.5 to be unsafe. https://datatra
src/anthropic/_utils/_path.py:38
Function
_quote_path_segment_part
Percent-encode `value` for use in a URI path segment. Considers characters not in `pchar` set from RFC 3986 §3.3 to be unsafe. https://datatr
src/anthropic/_utils/_path.py:17
Function
_quote_query_part
Percent-encode `value` for use in a URI query string. Considers &, = and characters not in `query` set from RFC 3986 §3.4 to be unsafe. https
src/anthropic/_utils/_path.py:29
Function
_read_env_token
()
src/anthropic/lib/credentials/_chain.py:49
Method
_record
(**kwargs: object)
tests/lib/test_google_cloud.py:213
Method
_reset_shadow_one_shot
(self)
tests/lib/test_credentials.py:2932
Method
_serialize
Always serialize as a list so Pydantic's JSON encoder is happy.
src/anthropic/_models.py:485
Method
_set_private_attributes
( self, model: Type[_T], client: AsyncAPIClient, options: FinalRequestOptions,
src/anthropic/_base_client.py:340
Method
_should_retry
(self, response: httpx.Response)
src/anthropic/_client.py:817
Method
_sleep
(self, seconds: float)
src/anthropic/_resource.py:24
Method
_sleep
(self, seconds: float)
src/anthropic/_resource.py:40
Method
_spin
(self)
examples/memory/basic.py:61
Method
_stop_watcher
When ``_stop`` is set, close the work stream so :meth:`_dispatch_loop` exits.
src/anthropic/lib/tools/_beta_session_runner.py:946
Method
_stream_loop
(self)
src/anthropic/lib/tools/_beta_session_runner.py:631
Function
_sync_noop
(_seconds: float)
tests/lib/environments/test_poller_method.py:102
Method
_test
()
tests/lib/tools/test_mcp_tool.py:327
Method
_validate
(v: Iterable[_T], handler: "ValidatorFunctionWrapHandler")
src/anthropic/_models.py:456
Method
_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/_client.py:371
Method
_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/_client.py:791
Method
_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/lib/foundry.py:314
Method
_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/lib/foundry.py:533
Method
_validate_headers
(self, headers: Any, custom_headers: Any)
src/anthropic/lib/bedrock/_mantle.py:259
Method
_validate_headers
(self, headers: Any, custom_headers: Any)
src/anthropic/lib/bedrock/_mantle.py:455
Method
_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/lib/aws/_client.py:347
Method
_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/lib/google_cloud/_client.py:320
Method
_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/lib/google_cloud/_client.py:558
Function
_waiter
(ev: anyio.Event)
src/anthropic/lib/tools/_beta_session_runner.py:956
Method
a_sync_cm
()
tests/lib/tools/test_functions.py:545
Method
ack
Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating se
src/anthropic/resources/beta/environments/work.py:789
Method
ack
(self, work_id: str, **kwargs: Any)
tests/lib/environments/test_poller_method.py:86
Method
add
Add Session Resource Args: file_id: ID of a previously uploaded file. mount_path: Mount path in the container.
src/anthropic/resources/beta/sessions/resources.py:625
Method
add_leak
(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.StatisticDiff)
tests/test_client.py:290
Method
add_leak
(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.StatisticDiff)
tests/test_client.py:1400
Method
add_numbers
Add two numbers together.
tests/lib/tools/test_functions.py:82
Method
add_trace_header
(request: APIRequest, call_next: CallNext)
tests/test_middleware.py:731
Method
add_trace_header
(request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:1406
Method
adder_cm
()
tests/lib/tools/test_functions.py:470
Method
agents
(self)
src/anthropic/resources/beta/beta.py:134
Method
agents
(self)
src/anthropic/resources/beta/beta.py:215
Method
agents
(self)
src/anthropic/resources/beta/beta.py:299
Method
agents
(self)
src/anthropic/resources/beta/beta.py:360
Method
agents
(self)
src/anthropic/resources/beta/beta.py:421
Method
agents
(self)
src/anthropic/resources/beta/beta.py:482
Method
aiter_bytes
Given an async iterator that yields raw binary data, iterate over it & yield every event encountered
src/anthropic/_streaming.py:531
Method
aiter_bytes
Given an async iterator that yields lines, iterate over it & yield every event encountered
src/anthropic/lib/bedrock/_stream_decoder.py:43
Method
aiter_raw
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:496
Method
an_async_cm
()
tests/lib/tools/test_functions.py:541
Method
archive
Archive a Dream Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Sen
src/anthropic/resources/beta/dreams.py:531
Method
archive
Archive Deployment Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers:
src/anthropic/resources/beta/deployments.py:378
Method
archive
Archive Deployment Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers:
src/anthropic/resources/beta/deployments.py:907
Method
archive
Archive an environment by ID. Archived environments cannot be used to create new sessions. Args: betas: Optional h
src/anthropic/resources/beta/environments/environments.py:367
Method
archive
Archive an environment by ID. Archived environments cannot be used to create new sessions. Args: betas: Optional h
src/anthropic/resources/beta/environments/environments.py:749
Method
archive
Archive Session Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Sen
src/anthropic/resources/beta/sessions/sessions.py:445
Method
archive
Archive Session Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Sen
src/anthropic/resources/beta/sessions/sessions.py:881
Method
archive
Archive Session Thread Args: betas: Optional header to specify the beta version(s) you want to use. extra_heade
src/anthropic/resources/beta/sessions/threads/threads.py:174
Method
archive
Archive Session Thread Args: betas: Optional header to specify the beta version(s) you want to use. extra_heade
src/anthropic/resources/beta/sessions/threads/threads.py:370
Method
archive
Archive Credential Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers:
src/anthropic/resources/beta/vaults/credentials.py:360
Method
archive
Archive Credential Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers:
src/anthropic/resources/beta/vaults/credentials.py:802
Method
archive
Archive Vault Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Send
src/anthropic/resources/beta/vaults/vaults.py:338
Method
archive
Archive Vault Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Send
src/anthropic/resources/beta/vaults/vaults.py:690
Method
archive
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/certificates.py:242
Method
archive
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/certificates.py:523
Method
archive
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/tunnels.py:239
Method
archive
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/tunnels.py:616
Method
archive
Archive a memory store Args: betas: Optional header to specify the beta version(s) you want to use. extra_heade
src/anthropic/resources/beta/memory_stores/memory_stores.py:381
Method
archive
Archive a memory store Args: betas: Optional header to specify the beta version(s) you want to use. extra_heade
src/anthropic/resources/beta/memory_stores/memory_stores.py:767
Method
archive
Archive Agent Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Send
src/anthropic/resources/beta/agents/agents.py:399
Method
archive
Archive Agent Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Send
src/anthropic/resources/beta/agents/agents.py:803
Method
astream_to_file
( self, file: str | os.PathLike[str], *, chunk_size: int | None = None, )
src/anthropic/_legacy_response.py:502
Method
async_auth_flow
(self, request: httpx.Request)
src/anthropic/lib/credentials/_auth.py:114
Function
async_client
(request: FixtureRequest)
tests/conftest.py:112
Function
async_client
()
tests/lib/test_google_cloud_live.py:45
Function
async_files_from_dir
(directory: str | os.PathLike[str])
src/anthropic/lib/_files.py:28
Method
async_fn
(request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:1279
Method
async_fn
(request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:1769
Method
async_fn
(request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:2052
Function
async_local_filesystem_tool
(temp_directory: str)
tests/lib/tools/memory_tools/test_filesystem.py:38
Method
async_only
(request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:1197
Function
async_snapshot_client
( is_recording: bool, http_snapshot_serializer_options: SnapshotSerializerOptions, http_snapshot:
tests/conftest.py:99
Method
async_stream_parse
(client: AsyncAnthropic)
tests/lib/_parse/test_beta_messages.py:22
Function
async_to_raw_response_wrapper
Higher order function that takes one of our bound API methods and wraps it to support returning the raw `APIResponse` object directly.
src/anthropic/_response.py:797
Function
async_to_raw_response_wrapper
Higher order function that takes one of our bound API methods and wraps it to support returning the raw `APIResponse` object directly.
src/anthropic/_legacy_response.py:395
Method
async_token_provider
()
tests/lib/test_azure.py:132
Method
auth_headers
(self)
src/anthropic/_base_client.py:711
Method
auth_headers
(self)
src/anthropic/_client.py:337
Method
auth_headers
(self)
src/anthropic/_client.py:757
Method
auth_headers
(self)
src/anthropic/lib/foundry.py:303
← previous
next →
1,301–1,400 of 4,911, ranked by callers