list() — anthropic-sdk-python Function Reference
Architecture documentation for the list() function in batches.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 4c022c9e_d487_75fa_327c_44ce5e30d464["list()"] 2a025d5d_3057_7bf3_fea3_d693a30b85ec["Batches"] 4c022c9e_d487_75fa_327c_44ce5e30d464 -->|defined in| 2a025d5d_3057_7bf3_fea3_d693a30b85ec 336b3acb_05a1_3333_7a54_bcd38f9ee176["list()"] 336b3acb_05a1_3333_7a54_bcd38f9ee176 -->|calls| 4c022c9e_d487_75fa_327c_44ce5e30d464 336b3acb_05a1_3333_7a54_bcd38f9ee176["list()"] 4c022c9e_d487_75fa_327c_44ce5e30d464 -->|calls| 336b3acb_05a1_3333_7a54_bcd38f9ee176 style 4c022c9e_d487_75fa_327c_44ce5e30d464 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/resources/messages/batches.py lines 130–188
def list(
self,
*,
after_id: str | Omit = omit,
before_id: str | Omit = omit,
limit: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncPage[MessageBatch]:
"""List all Message Batches within a Workspace.
Most recently created batches are
returned first.
Learn more about the Message Batches API in our
[user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
Args:
after_id: ID of the object to use as a cursor for pagination. When provided, returns the
page of results immediately after this object.
before_id: ID of the object to use as a cursor for pagination. When provided, returns the
page of results immediately before this object.
limit: Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/v1/messages/batches",
page=SyncPage[MessageBatch],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"after_id": after_id,
"before_id": before_id,
"limit": limit,
},
batch_list_params.BatchListParams,
),
),
model=MessageBatch,
)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does list() do?
list() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/resources/messages/batches.py.
Where is list() defined?
list() is defined in src/anthropic/resources/messages/batches.py at line 130.
What does list() call?
list() calls 1 function(s): list.
What calls list()?
list() is called by 1 function(s): list.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free