MCPcopy Create free account

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

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

Methodastream_to_file
( self, file: str | os.PathLike[str], *, chunk_size: int | None = None, )
src/anthropic/_legacy_response.py:499
Functionasync_client
(request: FixtureRequest)
tests/conftest.py:45
Functionasync_to_custom_raw_response_wrapper
Higher order function that takes one of our bound API methods and an `APIResponse` class and wraps the method to support returning the given respo
src/anthropic/_response.py:834
Functionasync_to_custom_streamed_response_wrapper
Higher order function that takes one of our bound API methods and an `APIResponse` class and wraps the method to support streaming and returning t
src/anthropic/_response.py:752
Functionasync_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:794
Functionasync_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:392
Methodauth_headers
(self)
src/anthropic/_base_client.py:603
Methodauth_headers
(self)
src/anthropic/_client.py:137
Methodauth_headers
(self)
src/anthropic/_client.py:357
Methodbase_url
(self)
src/anthropic/_base_client.py:639
Methodbatches
(self)
src/anthropic/resources/beta/messages/messages.py:55
Methodbatches
(self)
src/anthropic/resources/beta/messages/messages.py:1231
Methodbatches
(self)
src/anthropic/resources/beta/messages/messages.py:2415
Methodbatches
(self)
src/anthropic/resources/beta/messages/messages.py:2431
Methodbatches
(self)
src/anthropic/resources/beta/messages/messages.py:2447
Methodbatches
(self)
src/anthropic/resources/beta/messages/messages.py:2463
Methodbatches
(self)
src/anthropic/resources/messages/messages.py:63
Methodbatches
(self)
src/anthropic/resources/messages/messages.py:1213
Methodbatches
(self)
src/anthropic/resources/messages/messages.py:2372
Methodbatches
(self)
src/anthropic/resources/messages/messages.py:2388
Methodbatches
(self)
src/anthropic/resources/messages/messages.py:2404
Methodbatches
(self)
src/anthropic/resources/messages/messages.py:2420
Methodbuild_request
(options: FinalRequestOptions)
tests/test_client.py:1062
Methodcancel
Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at whi
src/anthropic/resources/beta/messages/batches.py:282
Methodcancel
Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at whi
src/anthropic/resources/beta/messages/batches.py:651
Methodcancel
Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at whi
src/anthropic/resources/messages/batches.py:507
Methodcharset_encoding
(self)
src/anthropic/_legacy_response.py:428
Functionclient
(request: FixtureRequest)
tests/conftest.py:35
Methodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/_response.py:484
Methodclose
(self)
src/anthropic/_legacy_response.py:478
Methodconstruct
( # type: ignore cls, _fields_set: set[str] | None = None, **values: Unpack[FinalRequ
src/anthropic/_models.py:809
Methodcontent
Return the binary response content. NOTE: this will be removed in favour of `.read()` in the next major version.
src/anthropic/_legacy_response.py:170
Methodcontent
(self)
src/anthropic/_legacy_response.py:416
Methodcopy
Create a new client instance re-using the same options given to the current client with optional overriding.
src/anthropic/lib/bedrock/_client.py:333
Methodcount_tokens
Count the number of tokens in a Message. The Token Count API can be used to count the number of tokens in a Message, includi
src/anthropic/resources/beta/messages/messages.py:997
Methodcount_tokens
Count the number of tokens in a Message. The Token Count API can be used to count the number of tokens in a Message, includi
src/anthropic/resources/beta/messages/messages.py:2171
Methodcount_tokens
Count the number of tokens in a Message. The Token Count API can be used to count the number of tokens in a Message, includi
src/anthropic/resources/messages/messages.py:2142
Methodcreate
[Legacy] Create a Text Completion. The Text Completions API is a legacy API. We recommend using the [Messages API](https://d
src/anthropic/resources/completions.py:432
Methodcreate
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/beta/messages/batches.py:54
Methodcreate
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/beta/messages/batches.py:423
Methodcreate
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/beta/messages/messages.py:78
Methodcreate
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/beta/messages/messages.py:1254
Methodcreate
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/messages/batches.py:50
Methodcreate
Send a batch of Message creation requests. The Message Batches API can be used to process multiple Messages API requests at
src/anthropic/resources/messages/batches.py:335
Methodcreate
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/messages/messages.py:86
Methodcreate
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversa
src/anthropic/resources/messages/messages.py:1236
Methodcurrent_message_snapshot
(self)
src/anthropic/lib/streaming/_beta_messages.py:108
Methodcurrent_message_snapshot
(self)
src/anthropic/lib/streaming/_beta_messages.py:245
Methodcurrent_message_snapshot
(self)
src/anthropic/lib/streaming/_messages.py:108
Methodcurrent_message_snapshot
(self)
src/anthropic/lib/streaming/_messages.py:245
Methodcustom_auth
(self)
src/anthropic/_base_client.py:599
Methoddata
(self)
src/anthropic/_streaming.py:288
Methoddefault_headers
(self)
src/anthropic/_base_client.py:607
Methoddefault_headers
(self)
src/anthropic/_client.py:160
Methoddefault_headers
(self)
src/anthropic/_client.py:380
Methoddefault_query
(self)
src/anthropic/_base_client.py:618
Methoddelete
( self, path: str, *, cast_to: Type[ResponseT], body: Body | None = No
src/anthropic/_base_client.py:1875
Methoddelete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/beta/messages/batches.py:230
Methoddelete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/beta/messages/batches.py:599
Methoddelete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/messages/batches.py:184
Methoddelete
Delete a Message Batch. Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-
src/anthropic/resources/messages/batches.py:469
Methodelapsed
The time taken for the complete request/response cycle to complete.
src/anthropic/_response.py:109
Methodelapsed
The time taken for the complete request/response cycle to complete.
src/anthropic/_legacy_response.py:195
Methodencoding
(self)
src/anthropic/_legacy_response.py:424
Methodevent
(self)
src/anthropic/_streaming.py:276
Functionfield_is_required
(field: FieldInfo)
src/anthropic/_compat.py:86
Functionfile_from_path
(path: str)
src/anthropic/_utils/_utils.py:359
Functionfunction_has_argument
Returns whether or not the given function has a specific parameter
src/anthropic/_utils/_reflection.py:7
Methodget
( self, path: str, *, cast_to: Type[ResponseT], options: RequestOption
src/anthropic/_base_client.py:1753
Methodget_api_list
( self, path: str, *, model: Type[object], page: Type[SyncPageT],
src/anthropic/_base_client.py:1320
Methodget_api_list
( self, path: str, *, model: Type[_T], page: Type[AsyncPageT],
src/anthropic/_base_client.py:1886
Methodget_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_beta_messages.py:83
Methodget_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_beta_messages.py:220
Methodget_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_messages.py:83
Methodget_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_messages.py:220
Methodget_next_page
(self: AsyncPageT)
src/anthropic/_base_client.py:314
Functionget_required_header
(headers: HeadersLike, header: str)
src/anthropic/_utils/_utils.py:365
Methodheaders
(self)
src/anthropic/_response.py:83
Methodheaders
(self)
src/anthropic/_legacy_response.py:150
Methodhttp_request
Returns the httpx Request instance associated with the current response.
src/anthropic/_response.py:87
Methodhttp_request
(self)
src/anthropic/_legacy_response.py:154
Methodhttp_version
(self)
src/anthropic/_response.py:105
Methodhttp_version
(self)
src/anthropic/_legacy_response.py:187
Functioninner
(func: CallableT)
src/anthropic/_utils/_utils.py:229
Methodis_closed
(self)
src/anthropic/_legacy_response.py:191
Methodis_closed
(self)
src/anthropic/_base_client.py:871
Methodis_closed
(self)
src/anthropic/_base_client.py:1457
Functionis_sequence
(obj: object)
src/anthropic/_utils/_utils.py:144
Functionis_tuple
(obj: object)
src/anthropic/_utils/_utils.py:136
Methoditer_bytes
A byte-iterator over the decoded response content. This automatically handles gzip, deflate and brotli encoded responses.
src/anthropic/_response.py:491
Methoditer_bytes
Given an iterator that yields raw binary data, iterate over it & yield every event encountered
src/anthropic/_streaming.py:406
Methoditer_bytes
Given an iterator that yields lines, iterate over it & yield every event encountered
src/anthropic/lib/bedrock/_stream_decoder.py:30
Methoditer_lines
Like `iter_text()` but will only yield chunks for each line
src/anthropic/_response.py:401
Methoditer_lines
Like `iter_text()` but will only yield chunks for each line
src/anthropic/_response.py:508
Methoditer_lines
(self)
src/anthropic/_legacy_response.py:443
Methoditer_raw
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:446
Methoditer_text
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding.
src/anthropic/_response.py:393
Methoditer_text
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding.
src/anthropic/_response.py:500
Methoditer_text
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:440
Methodjson
Read and decode the JSON response content.
src/anthropic/_response.py:479
← previousnext →501–600 of 1,183, ranked by callers