MCPcopy Create free account

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

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

↓ 2 callersMethod__init__
( self, *, raw: httpx.Response, cast_to: type[R], client: BaseClient[A
src/anthropic/_response.py:62
↓ 2 callersFunction_async_transform_recursive
Transform the given data against the expected type. Args: annotation: The direct type annotation given to the particular piece of data.
src/anthropic/_utils/_transform.py:288
↓ 2 callersFunction_collect_error
(match: Match[str])
scripts/utils/ruffen-docs.py:39
↓ 2 callersMethod_enforce_trailing_slash
(self, url: URL)
src/anthropic/_base_client.py:374
↓ 2 callersFunction_get_params
(client: BaseClient[Any, Any])
tests/test_client.py:43
↓ 2 callersMethod_info_to_options
(self, info: PageInfo)
src/anthropic/_base_client.py:184
↓ 2 callersMethod_iter_events
(self)
src/anthropic/_streaming.py:71
↓ 2 callersMethod_make_sse_decoder
(self)
src/anthropic/_base_client.py:442
↓ 2 callersMethod_make_status_error
( self, err_msg: str, *, body: object, response: httpx.Response, )
src/anthropic/_client.py:238
↓ 2 callersMethod_make_status_error_from_response
( self, response: httpx.Response, )
src/anthropic/_base_client.py:379
↓ 2 callersMethod_maybe_override_cast_to
(self, cast_to: type[ResponseT], options: FinalRequestOptions)
src/anthropic/_base_client.py:550
↓ 2 callersFunction_maybe_transform_key
Transform the given `data` based on the annotations provided in `type_`. Note: this function only looks at `Annotated` types that contain `Proper
src/anthropic/_utils/_transform.py:126
↓ 2 callersFunction_merge_mappings
Merge two mappings of the same type, removing any values that are instances of `Omit`. In cases with duplicate keys the second mapping takes prec
src/anthropic/_base_client.py:2072
↓ 2 callersMethod_parse
(self, *, to: type[_T] | None = None)
src/anthropic/_response.py:129
↓ 2 callersMethod_parse_message_from_event
(self, event: EventStreamMessage)
src/anthropic/lib/bedrock/_stream_decoder.py:54
↓ 2 callersFunction_prepare_options
(input_options: FinalRequestOptions)
src/anthropic/lib/bedrock/_client.py:35
↓ 2 callersFunction_prepare_options
(input_options: FinalRequestOptions, *, project_id: str | None, region: str)
src/anthropic/lib/vertex/_client.py:368
↓ 2 callersMethod_process_response_data
( self, *, data: object, cast_to: type[ResponseT], response: httpx.Res
src/anthropic/_base_client.py:570
↓ 2 callersMethod_request
( self, *, cast_to: Type[ResponseT], options: FinalRequestOptions, ret
src/anthropic/_base_client.py:967
↓ 2 callersMethod_request
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:1550
↓ 2 callersMethod_set_private_attributes
( self, client: SyncAPIClient, model: Type[_T], options: FinalRequestOptions,
src/anthropic/_base_client.py:205
↓ 2 callersMethod_should_retry
(self, response: httpx.Response)
src/anthropic/_base_client.py:710
↓ 2 callersMethod_should_stream_response_body
(self, request: httpx.Request)
src/anthropic/_base_client.py:567
↓ 2 callersFunction_transform_recursive
Transform the given data against the expected type. Args: annotation: The direct type annotation given to the particular piece of data.
src/anthropic/_utils/_transform.py:145
↓ 2 callersFunctionaccumulate_event
( *, event: BetaRawMessageStreamEvent, current_snapshot: BetaMessage | None, )
src/anthropic/lib/streaming/_beta_messages.py:370
↓ 2 callersFunctionaccumulate_event
( *, event: RawMessageStreamEvent, current_snapshot: Message | None, )
src/anthropic/lib/streaming/_messages.py:370
↓ 2 callersMethodaiter_bytes
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:484
↓ 2 callersMethodaread
(self)
src/anthropic/_legacy_response.py:481
↓ 2 callersFunctionassert_basic_response
(events: list[MessageStreamEvent], message: Message)
tests/lib/streaming/test_messages.py:66
↓ 2 callersFunctionasyncify
Take a blocking function and create an async one that receives the same positional and keyword arguments. For python version 3.9 and above, i
src/anthropic/_utils/_sync.py:38
↓ 2 callersFunctionbuild
Construct a BaseModel class without validation. This is useful for cases where you need to instantiate a `BaseModel` from an API response as
src/anthropic/_models.py:408
↓ 2 callersFunctionbuild_events
( *, event: BetaRawMessageStreamEvent, message_snapshot: BetaMessage, )
src/anthropic/lib/streaming/_beta_messages.py:300
↓ 2 callersFunctionbuild_events
( *, event: RawMessageStreamEvent, message_snapshot: Message, )
src/anthropic/lib/streaming/_messages.py:300
↓ 2 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/_response.py:377
↓ 2 callersFunctioncoerce_boolean
(val: str)
src/anthropic/_utils/_utils.py:317
↓ 2 callersFunctionconsume_async_iterator
(iterator: AsyncIterator[Any])
src/anthropic/_utils/_streams.py:10
↓ 2 callersFunctionconsume_sync_iterator
(iterator: Iterator[Any])
src/anthropic/_utils/_streams.py:5
↓ 2 callersFunctionextract_stream_chunk_type
Given a type like `Stream[T]`, returns the generic type variable `T`. This also handles the case where a concrete subclass is given, e.g. ```
src/anthropic/_streaming.py:421
↓ 2 callersFunctionfield_get_default
(field: FieldInfo)
src/anthropic/_compat.py:92
↓ 2 callersFunctionflatten
(t: Iterable[Iterable[_T]])
src/anthropic/_utils/_utils.py:34
↓ 2 callersFunctionformat_code_block
(code: str)
scripts/utils/ruffen-docs.py:107
↓ 2 callersFunctionget_auth_headers
( *, method: str, url: str, headers: httpx.Headers, aws_access_key: str | None, aws_se
src/anthropic/lib/bedrock/_auth.py:33
↓ 2 callersFunctionget_model_fields
(model: type[pydantic.BaseModel])
src/anthropic/_compat.py:115
↓ 2 callersMethodget_next_page
(self: SyncPageT)
src/anthropic/_base_client.py:237
↓ 2 callersMethodhas_next_page
(self)
src/anthropic/_base_client.py:169
↓ 2 callersFunctionis_base64_file_input
(obj: object)
src/anthropic/_files.py:23
↓ 2 callersFunctionis_basemodel
Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`
src/anthropic/_models.py:389
↓ 2 callersFunctionis_basemodel_type
(type_: type)
src/anthropic/_models.py:401
↓ 2 callersFunctionis_iterable_type
If the given type is `typing.Iterable[T]`
src/anthropic/_utils/_typing.py:28
↓ 2 callersFunctionis_literal_type
(type_: type[Any])
src/anthropic/_compat.py:40
↓ 2 callersFunctionis_required_type
(typ: type)
src/anthropic/_utils/_typing.py:38
↓ 2 callersFunctionis_sequence_t
(obj: _SequenceT | object)
src/anthropic/_utils/_utils.py:148
↓ 2 callersFunctionis_stream_class_type
TypeGuard for determining whether or not the given type is a subclass of `Stream` / `AsyncStream`
src/anthropic/_streaming.py:415
↓ 2 callersFunctionis_tuple_t
(obj: _TupleT | object)
src/anthropic/_utils/_utils.py:140
↓ 2 callersFunctionis_typeddict
(type_: type[Any])
src/anthropic/_compat.py:43
↓ 2 callersFunctionis_union
(tp: type[Any] | None)
src/anthropic/_compat.py:34
↓ 2 callersMethodjson
(self)
src/anthropic/_streaming.py:291
↓ 2 callersMethodstringify_items
( self, params: Params, *, array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
src/anthropic/_qs.py:55
↓ 2 callersMethoduntil_done
Blocks until the stream has been consumed
src/anthropic/lib/streaming/_messages.py:102
↓ 2 callersFunctionvalidate_type
Strict validation that the given value matches the expected type
src/anthropic/_models.py:675
↓ 1 callersMethod__decode__
(self)
src/anthropic/_decoders/jsonl.py:32
↓ 1 callersMethod__decode__
(self)
src/anthropic/_decoders/jsonl.py:77
↓ 1 callersMethod__init__
( self, *, raw: httpx.Response, cast_to: type[R], client: BaseClient[A
src/anthropic/_legacy_response.py:72
↓ 1 callersMethod__init__
Construct a new synchronous anthropic client instance. This automatically infers the following arguments from their corresponding environment
src/anthropic/_client.py:67
↓ 1 callersMethod__init__
( self, *, cast_to: type[_T], response: httpx.Response, client: Anthro
src/anthropic/lib/bedrock/_stream.py:15
↓ 1 callersMethod__init__
( self, aws_secret_key: str | None = None, aws_access_key: str | None = None,
src/anthropic/lib/bedrock/_client.py:107
↓ 1 callersMethod__init__
( self, *, region: str | NotGiven = NOT_GIVEN, project_id: str | NotGiven = NO
src/anthropic/lib/vertex/_client.py:88
↓ 1 callersMethod__init__
( self, *, raw_iterator: Iterator[bytes], line_type: type[_T], http_response: httpx.Response | None
src/anthropic/_decoders/jsonl.py:23
↓ 1 callersMethod__load__
(self)
src/anthropic/_utils/_proxy.py:62
↓ 1 callersMethod__stream__
(self)
src/anthropic/_streaming.py:74
↓ 1 callersMethod__stream__
(self)
src/anthropic/_streaming.py:192
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_beta_messages.py:112
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_beta_messages.py:249
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_messages.py:112
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_messages.py:249
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_beta_messages.py:123
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_beta_messages.py:260
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_messages.py:123
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_messages.py:260
↓ 1 callersMethod_aiter_chunks
Given an iterator that yields raw binary data, iterate over it and yield individual SSE chunks
src/anthropic/_streaming.py:343
↓ 1 callersFunction_assert_list_type
(type_: type[object], value: object)
tests/utils.py:137
↓ 1 callersFunction_async_format_data
(data: object, format_: PropertyFormat, format_template: str | None)
src/anthropic/_utils/_transform.py:352
↓ 1 callersFunction_async_read_file_content
(file: FileContent)
src/anthropic/_files.py:119
↓ 1 callersFunction_async_transform_file
(file: FileTypes)
src/anthropic/_files.py:105
↓ 1 callersFunction_async_transform_typeddict
( data: Mapping[str, object], expected_type: type, )
src/anthropic/_utils/_transform.py:379
↓ 1 callersFunction_basic_config
()
src/anthropic/_utils/_logs.py:8
↓ 1 callersFunction_build_discriminated_union_meta
(*, union: type, meta_annotations: tuple[Any, ...])
src/anthropic/_models.py:598
↓ 1 callersMethod_build_headers
(self, options: FinalRequestOptions, *, retries_taken: int = 0)
src/anthropic/_base_client.py:410
↓ 1 callersFunction_construct_field
(value: object, field: FieldInfo, key: str)
src/anthropic/_models.py:374
↓ 1 callersFunction_create_pydantic_model
(type_: _T)
src/anthropic/_models.py:748
↓ 1 callersMethod_ensure_access_token
(self)
src/anthropic/lib/vertex/_client.py:149
↓ 1 callersMethod_ensure_access_token
(self)
src/anthropic/lib/vertex/_client.py:291
↓ 1 callersFunction_extract_field_schema_pv2
(model: type[BaseModel], field_name: str)
src/anthropic/_models.py:657
↓ 1 callersFunction_extract_items
( obj: object, path: Sequence[str], *, index: int, flattened_key: str | None, )
src/anthropic/_utils/_utils.py:57
↓ 1 callersFunction_format_data
(data: object, format_: PropertyFormat, format_template: str | None)
src/anthropic/_utils/_transform.py:209
↓ 1 callersMethod_get_page
(self)
src/anthropic/_base_client.py:264
↓ 1 callersFunction_get_session
( *, aws_access_key: str | None, aws_secret_key: str | None, aws_session_token: str | None,
src/anthropic/lib/bedrock/_auth.py:14
↓ 1 callersMethod_idempotency_key
(self)
src/anthropic/_base_client.py:745
↓ 1 callersMethod_iter_chunks
Given an iterator that yields raw binary data, iterate over it and yield individual SSE chunks
src/anthropic/_streaming.py:321
↓ 1 callersMethod_iter_events
(self)
src/anthropic/_streaming.py:188
← previousnext →101–200 of 1,183, ranked by callers