batches.py — anthropic-sdk-python Source File
Architecture documentation for batches.py, a python file in the anthropic-sdk-python codebase. 18 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR b2b2bd85_e598_f0e9_64e6_661945bb42ac["batches.py"] 0db75921_ff1f_34f6_b0e3_6b94eee3e8e5["0db75921:ff1f:34f6:b0e3:6b94eee3e8e5"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 0db75921_ff1f_34f6_b0e3_6b94eee3e8e5 4f8a5ca5_1399_26fa_96cc_530083c5b56a["_types"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 4f8a5ca5_1399_26fa_96cc_530083c5b56a a598874f_bdd1_847f_b583_9bee29d9aefd["_utils"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> a598874f_bdd1_847f_b583_9bee29d9aefd 9be5f176_2b59_9ad9_2567_fdb1385b6411["_compat"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 9be5f176_2b59_9ad9_2567_fdb1385b6411 940accd6_4f2d_2a66_2b2c_c6069ca0fbc7["_resource"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 940accd6_4f2d_2a66_2b2c_c6069ca0fbc7 33844c08_d82a_73b3_1c52_f240f812e55b["_response"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 33844c08_d82a_73b3_1c52_f240f812e55b 4954f903_1833_3f02_9fb3_0ffb92c94545["pagination"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 4954f903_1833_3f02_9fb3_0ffb92c94545 776048dd_b99c_d321_b9c4_775b3810a87e["_exceptions"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 776048dd_b99c_d321_b9c4_775b3810a87e 185cb646_8cb6_d883_baae_072a34fea0d1["_base_client"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 185cb646_8cb6_d883_baae_072a34fea0d1 47cc5dd1_0e77_c685_e24f_886b5d92b627["_decoders.jsonl"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 47cc5dd1_0e77_c685_e24f_886b5d92b627 731dcd44_7536_5ce1_6460_45fbbb9e2b6d["types.beta.messages"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 731dcd44_7536_5ce1_6460_45fbbb9e2b6d eb05f109_58be_d8c5_a720_fe3c70269152["types.anthropic_beta_param"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> eb05f109_58be_d8c5_a720_fe3c70269152 2f532904_1cdf_a5fc_22ad_19fdcf997eff["types.beta.messages.beta_message_batch"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> 2f532904_1cdf_a5fc_22ad_19fdcf997eff e19be1ee_3f83_0552_c5b6_070c31e42ed6["types.beta.messages.beta_deleted_message_batch"] b2b2bd85_e598_f0e9_64e6_661945bb42ac --> e19be1ee_3f83_0552_c5b6_070c31e42ed6 style b2b2bd85_e598_f0e9_64e6_661945bb42ac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import List, Iterable
from itertools import chain
import httpx
from .... import _legacy_response
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import is_given, maybe_transform, strip_not_given, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ....pagination import SyncPage, AsyncPage
from ...._exceptions import AnthropicError
from ...._base_client import AsyncPaginator, make_request_options
from ...._decoders.jsonl import JSONLDecoder, AsyncJSONLDecoder
from ....types.beta.messages import batch_list_params, batch_create_params
from ....types.anthropic_beta_param import AnthropicBetaParam
from ....types.beta.messages.beta_message_batch import BetaMessageBatch
from ....types.beta.messages.beta_deleted_message_batch import BetaDeletedMessageBatch
from ....types.beta.messages.beta_message_batch_individual_response import BetaMessageBatchIndividualResponse
__all__ = ["Batches", "AsyncBatches"]
class Batches(SyncAPIResource):
@cached_property
def with_raw_response(self) -> BatchesWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
"""
return BatchesWithRawResponse(self)
@cached_property
def with_streaming_response(self) -> BatchesWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response
"""
return BatchesWithStreamingResponse(self)
def create(
self,
*,
requests: Iterable[batch_create_params.Request],
betas: List[AnthropicBetaParam] | 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,
) -> BetaMessageBatch:
// ... (825 more lines)
Domain
Subdomains
Classes
Dependencies
- 0db75921:ff1f:34f6:b0e3:6b94eee3e8e5
- _base_client
- _compat
- _decoders.jsonl
- _exceptions
- _resource
- _response
- _types
- _utils
- httpx
- itertools
- pagination
- types.anthropic_beta_param
- types.beta.messages
- types.beta.messages.beta_deleted_message_batch
- types.beta.messages.beta_message_batch
- types.beta.messages.beta_message_batch_individual_response
- typing
Imported By
Source
Frequently Asked Questions
What does batches.py do?
batches.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain, AsyncAPI subdomain.
What does batches.py depend on?
batches.py imports 18 module(s): 0db75921:ff1f:34f6:b0e3:6b94eee3e8e5, _base_client, _compat, _decoders.jsonl, _exceptions, _resource, _response, _types, and 10 more.
What files import batches.py?
batches.py is imported by 2 file(s): __init__.py, messages.py.
Where is batches.py in the architecture?
batches.py is located at src/anthropic/resources/beta/messages/batches.py (domain: AnthropicClient, subdomain: AsyncAPI, directory: src/anthropic/resources/beta/messages).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free