Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
12,274 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
12,274
◇
Types & classes
3,937
↳
Endpoints
46
↓ 1 callers
Function
warn_env_static_shadows_auto_discovery
Warn that an `ANTHROPIC_API_KEY` / `ANTHROPIC_AUTH_TOKEN` from the environment is shadowing the SDK's profile / federation auto-discovery. Pe
src/anthropic/lib/credentials/_auth.py:30
↓ 1 callers
Method
withhold_snapshot
(self)
src/anthropic/lib/_tracing/_streaming.py:126
↓ 1 callers
Function
without
`fields` without the value at `path`, as a copy that shares what the path does not go through.
src/anthropic/lib/_tracing/_response.py:89
↓ 1 callers
Function
without_cache_control
A copy of `value`, which `as_sent()` returned, without the `cache_control` of any block in it, however deep. Only the keys that hold blocks are fo
src/anthropic/lib/threads/_thread_state.py:652
↓ 1 callers
Function
without_message_delta_fields
The fields of the streamed `message` without what is under `FINAL_FROM_MESSAGE_DELTA`. Until that event the snapshot has what `message_start` put
src/anthropic/lib/_tracing/_response.py:34
↓ 1 callers
Function
without_omit
`hints` with the `| Omit` that every optional field of a thread params type adds to the type `create()` gives it.
tests/lib/threads/test_beta_threads.py:2250
↓ 1 callers
Function
write
Write a file, creating parent directories as needed.
src/anthropic/lib/tools/agent_toolset.py:745
↓ 1 callers
Function
write_package
(repo: Path, files: dict[str, str])
tests/test_detect_breaking_changes.py:53
Method
__aenter__
(self)
src/anthropic/_response.py:683
Method
__aenter__
(self: _T)
src/anthropic/_base_client.py:1930
Method
__aenter__
(self)
src/anthropic/_streaming.py:261
Method
__aenter__
(self)
src/anthropic/lib/tools/_toolsets/_runnable.py:167
Method
__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:254
Method
__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:368
Method
__aenter__
(self)
src/anthropic/lib/streaming/_messages.py:242
Method
__aenter__
(self)
src/anthropic/lib/streaming/_messages.py:351
Method
__aenter__
(self)
src/anthropic/lib/threads/_stream_managers.py:86
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_response.py:687
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_base_client.py:1933
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_streaming.py:264
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None
src/anthropic/lib/tools/_toolsets/_runnable.py:171
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_beta_messages.py:257
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_beta_messages.py:373
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_messages.py:245
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_messages.py:356
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/threads/_stream_managers.py:92
Method
__aexit__
(self, *exc: object)
tests/lib/tools/test_session_runner.py:171
Method
__aiter__
(self)
src/anthropic/_base_client.py:364
Method
__aiter__
(self)
src/anthropic/_base_client.py:390
Method
__aiter__
(self)
src/anthropic/_tracing.py:590
Method
__aiter__
(self)
src/anthropic/_streaming.py:192
Method
__aiter__
(self)
src/anthropic/lib/tools/_beta_runner.py:1169
Method
__aiter__
(self)
src/anthropic/lib/tools/_beta_session_runner.py:507
Method
__aiter__
(self)
src/anthropic/lib/middleware/_fallbacks.py:1712
Method
__aiter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:250
Method
__aiter__
(self)
src/anthropic/lib/streaming/_messages.py:238
Method
__aiter__
(self)
src/anthropic/_vendor/httpx_aiohttp/transport.py:72
Method
__aiter__
(self)
src/anthropic/_decoders/jsonl.py:133
Method
__aiter__
(self)
tests/utils.py:200
Method
__aiter__
(self)
tests/test_open_telemetry.py:632
Method
__aiter__
(self)
tests/test_open_telemetry.py:2493
Method
__aiter__
(self)
tests/lib/tools/test_session_runner.py:174
Method
__aiter__
(self)
tests/lib/tools/test_runner_eager_tools.py:990
Method
__anext__
(self)
src/anthropic/lib/streaming/_beta_messages.py:247
Method
__anext__
(self)
src/anthropic/lib/streaming/_messages.py:235
Method
__anext__
(self)
src/anthropic/_decoders/jsonl.py:130
Method
__await__
(self)
src/anthropic/_base_client.py:345
Method
__bool__
(self)
src/anthropic/_types.py:253
Method
__bool__
(self)
src/anthropic/_types.py:283
Method
__bool__
(self)
src/anthropic/_base_client.py:2601
Method
__bool__
(self)
tests/lib/tools/toolsets/test_pipeline.py:252
Method
__call__
(self)
src/anthropic/lib/tools/_beta_functions.py:188
Method
__call__
(self, *_args: Any, **_kwds: Any)
src/anthropic/lib/tools/_beta_functions.py:237
Method
__call__
(self, *, force_refresh: bool = False)
src/anthropic/lib/credentials/_types.py:65
Method
__call__
(self, *, force_refresh: bool = False)
src/anthropic/lib/credentials/_types.py:76
Method
__call__
(self, *, force_refresh: bool = False)
src/anthropic/lib/credentials/_providers.py:124
Method
__call__
(self, *, force_refresh: bool = False)
src/anthropic/lib/credentials/_providers.py:135
Method
__call__
(self, *, force_refresh: bool = False)
src/anthropic/lib/credentials/_providers.py:506
Method
__call__
(self)
src/anthropic/lib/credentials/_providers.py:766
Method
__call__
(self, *, force_refresh: bool = False)
src/anthropic/lib/credentials/_workload.py:245
Method
__call__
The JSON that `body` is sent as, or `None` when the request went out without content.
tests/test_prepare.py:72
Method
__call__
(self, request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:299
Method
__call__
(self, request: APIRequest, call_next: CallNext)
tests/test_middleware.py:310
Method
__call__
(self, request: httpx2.Request)
tests/test_tracing.py:110
Method
__call__
(self, *_args: Any, **_kwds: Any)
tests/test_utils/test_proxy.py:13
Method
__call__
(self)
tests/lib/test_credentials.py:1585
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:1594
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:1674
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:1734
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:1751
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:1767
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:3483
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:3557
Method
__call__
(self, token: str, *, force_refresh: bool = False)
tests/lib/test_credentials.py:3603
Method
__call__
(self)
tests/lib/test_credentials.py:3716
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:4132
Method
__call__
(self, *, force_refresh: bool = False)
tests/lib/test_credentials.py:4185
Method
__call__
(self, **kwargs: object)
tests/lib/test_bedrock_mantle.py:67
Method
__call__
( self, replies: list[Reply | EventByEvent], *, stream: bool = True, r
tests/lib/tools/test_runner_eager_tools.py:1098
Method
__call__
(self, context: BetaConfirmContext)
tests/lib/tools/toolsets/test_confirm.py:210
Method
__call__
(self)
tests/lib/tools/memory_sync/conftest.py:22
Method
__contains__
(self, value: object, /)
src/anthropic/_types.py:375
Method
__decode__
(self)
src/anthropic/_decoders/jsonl.py:111
Method
__decode__
(self)
tests/decoders/test_jsonl.py:108
Method
__del__
(self)
src/anthropic/_base_client.py:1061
Method
__del__
(self)
src/anthropic/_base_client.py:1840
Method
__del__
(self)
src/anthropic/_tracing.py:569
Method
__del__
(self)
src/anthropic/_tracing.py:610
Method
__dir__
(self)
src/anthropic/_utils/_proxy.py:40
Method
__enter__
(self)
src/anthropic/_response.py:659
Method
__enter__
(self: _T)
src/anthropic/_base_client.py:1153
Method
__enter__
(self)
src/anthropic/lib/credentials/_workload.py:234
Method
__enter__
(self)
src/anthropic/lib/middleware/_fallbacks.py:83
Method
__enter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:82
Method
__enter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:194
Method
__enter__
(self)
src/anthropic/lib/streaming/_messages.py:77
Method
__enter__
(self)
src/anthropic/lib/streaming/_messages.py:184
Method
__enter__
(self)
src/anthropic/lib/threads/_stream_managers.py:40
Method
__exit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_response.py:663
Method
__exit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_base_client.py:1156
← previous
next →
1,801–1,900 of 12,274, ranked by callers