MCPcopy Create free account

hub / github.com/anthropics/anthropic-sdk-python / functions

Functions1,183 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersMethod_make_status_error
( self, err_msg: str, *, body: object, response: httpx.Response, )
src/anthropic/_base_client.py:401
↓ 1 callersMethod_params_from_url
(self, url: URL)
src/anthropic/_base_client.py:180
↓ 1 callersMethod_parse
(self, *, to: type[_T] | None = None)
src/anthropic/_legacy_response.py:199
↓ 1 callersMethod_parse_retry_after_header
Returns a float of the number of seconds (not milliseconds) to wait after retrying, or None if unspecified. About the Retry-After header: htt
src/anthropic/_base_client.py:652
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:895
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:1478
↓ 1 callersMethod_prepare_request
This method is used as a callback for mutating the `Request` object after it has been constructed. This is useful for cases where you
src/anthropic/_base_client.py:902
↓ 1 callersMethod_prepare_request
This method is used as a callback for mutating the `Request` object after it has been constructed. This is useful for cases where you
src/anthropic/_base_client.py:1485
↓ 1 callersMethod_prepare_url
Merge a URL argument together with any 'base_url' on the client, to create the URL used for the outgoing request.
src/anthropic/_base_client.py:429
↓ 1 callersMethod_primitive_value_to_str
(self, value: PrimitiveData)
src/anthropic/_qs.py:121
↓ 1 callersMethod_process_response
( self, *, cast_to: Type[ResponseT], options: FinalRequestOptions, res
src/anthropic/_base_client.py:1105
↓ 1 callersMethod_process_response
( self, *, cast_to: Type[ResponseT], options: FinalRequestOptions, res
src/anthropic/_base_client.py:1683
↓ 1 callersFunction_pycon_match
(match: Match[str])
scripts/utils/ruffen-docs.py:52
↓ 1 callersFunction_read_file_content
(file: FileContent)
src/anthropic/_files.py:77
↓ 1 callersMethod_request_api_list
( self, model: Type[_T], page: Type[AsyncPageT], options: FinalRequestOptions,
src/anthropic/_base_client.py:1744
↓ 1 callersMethod_retry_request
( self, options: FinalRequestOptions, cast_to: Type[ResponseT], *, ret
src/anthropic/_base_client.py:1074
↓ 1 callersMethod_retry_request
( self, options: FinalRequestOptions, cast_to: Type[ResponseT], *, ret
src/anthropic/_base_client.py:1654
↓ 1 callersMethod_serialize_multipartform
(self, data: Mapping[object, object])
src/anthropic/_base_client.py:520
↓ 1 callersMethod_stringify_item
( self, key: str, value: Data, opts: Options, )
src/anthropic/_qs.py:69
↓ 1 callersMethod_strip_raw_response_header
(self)
src/anthropic/_models.py:794
↓ 1 callersFunction_transform_file
(file: FileTypes)
src/anthropic/_files.py:63
↓ 1 callersFunction_transform_typeddict
( data: Mapping[str, object], expected_type: type, )
src/anthropic/_utils/_transform.py:236
↓ 1 callersMethod_validate_headers
Validate the given default headers and custom headers. Does nothing by default.
src/anthropic/_base_client.py:623
↓ 1 callersFunction_validate_non_model_type
(*, type_: type[_T], value: object)
src/anthropic/_models.py:726
↓ 1 callersMethodaiter_lines
(self)
src/anthropic/_legacy_response.py:490
↓ 1 callersMethodaiter_text
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:487
↓ 1 callersFunctionassert_empty_iter
(decoder: JSONLDecoder[Any] | AsyncJSONLDecoder[Any])
tests/decoders/test_jsonl.py:73
↓ 1 callersFunctionassert_is_file_content
(obj: object, *, key: str | None = None)
src/anthropic/_files.py:33
↓ 1 callersFunctionassert_matches_model
(model: type[BaseModelT], value: BaseModelT, *, path: list[str])
tests/utils.py:27
↓ 1 callersFunctionasync_client
()
examples/vertex.py:24
↓ 1 callersFunctionasync_stream
()
examples/text_completions_streaming.py:29
↓ 1 callersFunctionasync_transform
Transform dictionaries based off of type information from the given type, for example: ```py class Params(TypedDict, total=False): ca
src/anthropic/_utils/_transform.py:265
↓ 1 callersMethodbuild
( cls: type[_T], *, response: Response, data: object, )
src/anthropic/_types.py:160
↓ 1 callersMethodbuild_request
(options: FinalRequestOptions)
tests/test_client.py:197
↓ 1 callersMethodclose
Close the underlying HTTPX client. The client will *not* be usable after this.
src/anthropic/_base_client.py:1460
↓ 1 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/_streaming.py:249
↓ 1 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/lib/streaming/_beta_messages.py:204
↓ 1 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/lib/streaming/_messages.py:204
↓ 1 callersFunctioncoerce_float
(val: str)
src/anthropic/_utils/_utils.py:313
↓ 1 callersFunctioncoerce_integer
(val: str)
src/anthropic/_utils/_utils.py:309
↓ 1 callersMethodcopy
Create a new client instance re-using the same options given to the current client with optional overriding.
src/anthropic/lib/bedrock/_client.py:189
↓ 1 callersMethodcopy
Create a new client instance re-using the same options given to the current client with optional overriding.
src/anthropic/lib/vertex/_client.py:167
↓ 1 callersMethodcopy
Create a new client instance re-using the same options given to the current client with optional overriding.
src/anthropic/lib/vertex/_client.py:309
↓ 1 callersFunctionfield_outer_type
(field: FieldInfo)
src/anthropic/_compat.py:103
↓ 1 callersFunctionfinish_fragment
()
scripts/utils/ruffen-docs.py:56
↓ 1 callersFunctionformat_file
( filename: str, skip_errors: bool, )
scripts/utils/ruffen-docs.py:122
↓ 1 callersFunctionformat_str
( src: str, )
scripts/utils/ruffen-docs.py:33
↓ 1 callersFunctionget_architecture
()
src/anthropic/_base_client.py:2046
↓ 1 callersFunctionget_async_library
()
src/anthropic/_utils/_utils.py:384
↓ 1 callersMethodget_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_beta_messages.py:75
↓ 1 callersMethodget_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_beta_messages.py:212
↓ 1 callersMethodget_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_messages.py:212
↓ 1 callersFunctionget_model_config
(model: type[pydantic.BaseModel])
src/anthropic/_compat.py:109
↓ 1 callersFunctionget_platform
()
src/anthropic/_base_client.py:1966
↓ 1 callersFunctionget_python_runtime
()
src/anthropic/_base_client.py:2032
↓ 1 callersFunctionget_python_version
()
src/anthropic/_base_client.py:2039
↓ 1 callersFunctionget_response_stream_shape
()
src/anthropic/lib/bedrock/_stream_decoder.py:14
↓ 1 callersFunctionhuman_join
(seq: Sequence[str], *, delim: str = ", ", final: str = "or")
src/anthropic/_utils/_utils.py:188
↓ 1 callersMethodid
(self)
src/anthropic/_streaming.py:280
↓ 1 callersFunctionis_typevar
(typ: type)
src/anthropic/_utils/_typing.py:42
↓ 1 callersMethoditer_bytes
Given an iterator that yields raw binary data, iterate over it & yield every event encountered
src/anthropic/_streaming.py:311
↓ 1 callersMethoditer_pages
(self: SyncPageT)
src/anthropic/_base_client.py:228
↓ 1 callersMethoditer_pages
(self: AsyncPageT)
src/anthropic/_base_client.py:305
↓ 1 callersMethodjson
(self, **kwargs: Any)
src/anthropic/_legacy_response.py:431
↓ 1 callersFunctionjson_safe
Translates a mapping / sequence recursively in the same fashion as `pydantic` v2's `model_dump(mode="json")`.
src/anthropic/_utils/_utils.py:401
↓ 1 callersFunctionload_auth
(*, project_id: str | None)
src/anthropic/lib/vertex/_auth.py:18
↓ 1 callersFunctionlru_cache
A version of functools.lru_cache that retains the type signature for the wrapped function arguments.
src/anthropic/_utils/_utils.py:391
↓ 1 callersFunctionmain
(argv: Sequence[str] | None = None)
scripts/utils/ruffen-docs.py:143
↓ 1 callersFunctionmain
()
examples/text_completions_demo_sync.py:7
↓ 1 callersFunctionmain
()
examples/text_completions_demo_async.py:9
↓ 1 callersFunctionmain
()
examples/messages_stream.py:8
↓ 1 callersFunctionmain
()
examples/tools_stream.py:8
↓ 1 callersFunctionmodel_json
(model: pydantic.BaseModel, *, indent: int | None = None)
src/anthropic/_compat.py:127
↓ 1 callersFunctionmy_iter
()
tests/test_transform.py:382
↓ 1 callersFunctionparse_date
(value: date | StrBytesIntFloat)
src/anthropic/_compat.py:25
↓ 1 callersFunctionplatform_headers
(version: str, *, platform: Platform | None)
src/anthropic/_base_client.py:2009
↓ 1 callersMethodplatform_headers
(self)
src/anthropic/_base_client.py:646
↓ 1 callersFunctionquote
Add single quotation marks around the given string. Does *not* do any escaping.
src/anthropic/_utils/_utils.py:202
↓ 1 callersFunctionrefresh_auth
(credentials: Credentials)
src/anthropic/lib/vertex/_auth.py:39
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/beta/messages/batches.py:107
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/beta/messages/batches.py:476
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/messages/batches.py:89
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/messages/batches.py:374
↓ 1 callersFunctionstream_error
()
examples/text_completions_streaming.py:43
↓ 1 callersMethodstringify
( self, params: Params, *, array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
src/anthropic/_qs.py:40
↓ 1 callersFunctionsync_client
()
examples/vertex.py:6
↓ 1 callersFunctionsync_stream
()
examples/text_completions_streaming.py:15
↓ 1 callersFunctiontakes_pydantic
(model: pydantic.BaseModel)
tests/test_models.py:633
↓ 1 callersFunctionto_aiter
(iter: Iterator[bytes])
tests/test_streaming.py:227
↓ 1 callersFunctionto_aiter
(iter: Iterator[bytes])
tests/decoders/test_jsonl.py:62
↓ 1 callersFunctionto_thread
Asynchronously run function *func* in a separate thread. Any *args and **kwargs supplied for this function are directly passed to *fu
src/anthropic/_utils/_sync.py:19
↓ 1 callersFunctiontransform
Transform dictionaries based off of type information from the given type, for example: ```py class Params(TypedDict, total=False): ca
src/anthropic/_utils/_transform.py:88
↓ 1 callersMethoduntil_done
Blocks until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:102
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:239
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_messages.py:239
Method__aenter__
(self)
src/anthropic/_response.py:673
Method__aenter__
(self: _T)
src/anthropic/_base_client.py:1467
Method__aenter__
(self)
src/anthropic/_streaming.py:238
Method__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:193
Method__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:285
← previousnext →201–300 of 1,183, ranked by callers