models.py — anthropic-sdk-python Source File
Architecture documentation for models.py, a python file in the anthropic-sdk-python codebase. 13 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR aaf44c70_9358_3dce_9005_4fb1dbf27b38["models.py"] db16b317_c933_6e0c_8b96_632fe37cd631["db16b317:c933:6e0c:8b96:632fe37cd631"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> db16b317_c933_6e0c_8b96_632fe37cd631 51c07c54_4ff0_74b8_7db0_c729c19a1d10["_types"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 51c07c54_4ff0_74b8_7db0_c729c19a1d10 22218455_fc9f_15f0_bf36_f2f9bc534c1e["_utils"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 22218455_fc9f_15f0_bf36_f2f9bc534c1e dc5958fc_e31c_9b41_a81a_ee7083122a03["_compat"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> dc5958fc_e31c_9b41_a81a_ee7083122a03 9354af22_3497_4779_4c37_3dd69fe11c79["_resource"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 9354af22_3497_4779_4c37_3dd69fe11c79 c8c92b6a_a6eb_fe5f_d876_6512fac65c0f["_response"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> c8c92b6a_a6eb_fe5f_d876_6512fac65c0f 2cd57e3b_001d_9a78_afe2_f7e1d368b549["pagination"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 2cd57e3b_001d_9a78_afe2_f7e1d368b549 2349eb67_ace6_8cba_ff21_91985e9d8d0b["types.beta"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 2349eb67_ace6_8cba_ff21_91985e9d8d0b 12327afe_c8f3_459d_2c51_57998a1955ed["_base_client"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 12327afe_c8f3_459d_2c51_57998a1955ed 9888261e_2ea5_1966_74ef_5ce96c78f589["types.anthropic_beta_param"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 9888261e_2ea5_1966_74ef_5ce96c78f589 6cd8688b_500b_1773_66b8_b4c218aee807["types.beta.beta_model_info"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 6cd8688b_500b_1773_66b8_b4c218aee807 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875 9c26e8a9_1ad2_1174_876a_1fc500ce0eaf["httpx"] aaf44c70_9358_3dce_9005_4fb1dbf27b38 --> 9c26e8a9_1ad2_1174_876a_1fc500ce0eaf 359adaa8_f938_4372_5c68_79f4564b6b10["__init__.py"] 359adaa8_f938_4372_5c68_79f4564b6b10 --> aaf44c70_9358_3dce_9005_4fb1dbf27b38 style aaf44c70_9358_3dce_9005_4fb1dbf27b38 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
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
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 ...types.beta import model_list_params
from ..._base_client import AsyncPaginator, make_request_options
from ...types.anthropic_beta_param import AnthropicBetaParam
from ...types.beta.beta_model_info import BetaModelInfo
__all__ = ["Models", "AsyncModels"]
class Models(SyncAPIResource):
@cached_property
def with_raw_response(self) -> ModelsWithRawResponse:
"""
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 ModelsWithRawResponse(self)
@cached_property
def with_streaming_response(self) -> ModelsWithStreamingResponse:
"""
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 ModelsWithStreamingResponse(self)
def retrieve(
self,
model_id: str,
*,
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,
) -> BetaModelInfo:
"""
Get a specific model.
The Models API response can be used to determine information about a specific
model or resolve a model alias to a model ID.
// ... (272 more lines)
Domain
Subdomains
Classes
Dependencies
- _base_client
- _compat
- _resource
- _response
- _types
- _utils
- db16b317:c933:6e0c:8b96:632fe37cd631
- httpx
- pagination
- types.anthropic_beta_param
- types.beta
- types.beta.beta_model_info
- typing
Source
Frequently Asked Questions
What does models.py do?
models.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain, Authentication subdomain.
What does models.py depend on?
models.py imports 13 module(s): _base_client, _compat, _resource, _response, _types, _utils, db16b317:c933:6e0c:8b96:632fe37cd631, httpx, and 5 more.
What files import models.py?
models.py is imported by 2 file(s): __init__.py, beta.py.
Where is models.py in the architecture?
models.py is located at src/anthropic/resources/beta/models.py (domain: AnthropicClient, subdomain: Authentication, directory: src/anthropic/resources/beta).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free