_client.py — anthropic-sdk-python Source File
Architecture documentation for _client.py, a python file in the anthropic-sdk-python codebase. 30 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 3a4e7de9_0222_597c_a697_7ff97bd0dafc["_client.py"] f6cccbc2_b5f1_afc1_d6b1_b929a0d4c116["f6cccbc2:b5f1:afc1:d6b1:b929a0d4c116"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> f6cccbc2_b5f1_afc1_d6b1_b929a0d4c116 738dc346_a11e_4dc7_f7df_dced9f1a2476["_qs.py"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 738dc346_a11e_4dc7_f7df_dced9f1a2476 765fcca3_81c1_6ab1_98e8_c2929e7562e2["Querystring"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 765fcca3_81c1_6ab1_98e8_c2929e7562e2 87f621ac_b3e0_a225_72b3_99f9818f3002["_types.py"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 87f621ac_b3e0_a225_72b3_99f9818f3002 14d855f4_2395_cbc9_e501_5be17b6905d0["Omit"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 14d855f4_2395_cbc9_e501_5be17b6905d0 f30eca5a_2fa0_68c1_64aa_b52331a2dcc8["NotGiven"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> f30eca5a_2fa0_68c1_64aa_b52331a2dcc8 7ce58abf_a0c1_a253_85bf_5988de0346a4["RequestOptions"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 7ce58abf_a0c1_a253_85bf_5988de0346a4 6dadb144_3070_6111_357f_214554108905["__init__.py"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 6dadb144_3070_6111_357f_214554108905 5828b8ae_9c8c_9b95_9f29_d2659004d334["_compat.py"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 5828b8ae_9c8c_9b95_9f29_d2659004d334 648f3c73_52dd_5f80_1f4d_855f613beb61["cached_property"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 648f3c73_52dd_5f80_1f4d_855f613beb61 bb24da94_fa7d_baef_2969_cb15c30df3ae["_version.py"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> bb24da94_fa7d_baef_2969_cb15c30df3ae 8d141d22_ab1c_b4a1_744c_99e460d07454["_streaming.py"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 8d141d22_ab1c_b4a1_744c_99e460d07454 3c15a36b_3b82_93a8_fe82_3d955b1934ca["Stream"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 3c15a36b_3b82_93a8_fe82_3d955b1934ca 03fc0a8b_1c63_1aee_ef30_754aeebc2ff6["AsyncStream"] 3a4e7de9_0222_597c_a697_7ff97bd0dafc --> 03fc0a8b_1c63_1aee_ef30_754aeebc2ff6 style 3a4e7de9_0222_597c_a697_7ff97bd0dafc 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
import os
from typing import TYPE_CHECKING, Any, Mapping
from typing_extensions import Self, override
import httpx
from . import _constants, _exceptions
from ._qs import Querystring
from ._types import (
Omit,
Headers,
Timeout,
NotGiven,
Transport,
ProxiesTypes,
RequestOptions,
not_given,
)
from ._utils import is_given, get_async_library
from ._compat import cached_property
from ._version import __version__
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import APIStatusError
from ._base_client import (
DEFAULT_MAX_RETRIES,
SyncAPIClient,
AsyncAPIClient,
)
if TYPE_CHECKING:
from .resources import beta, models, messages, completions
from .resources.models import Models, AsyncModels
from .resources.beta.beta import Beta, AsyncBeta
from .resources.completions import Completions, AsyncCompletions
from .resources.messages.messages import Messages, AsyncMessages
__all__ = [
"Timeout",
"Transport",
"ProxiesTypes",
"RequestOptions",
"Anthropic",
"AsyncAnthropic",
"Client",
"AsyncClient",
]
class Anthropic(SyncAPIClient):
# client options
api_key: str | None
auth_token: str | None
# constants
HUMAN_PROMPT = _constants.HUMAN_PROMPT
AI_PROMPT = _constants.AI_PROMPT
// ... (594 more lines)
Domain
Subdomains
Functions
Classes
Dependencies
- APIStatusError
- AsyncAPIClient
- AsyncStream
- NotGiven
- Omit
- Querystring
- RequestOptions
- Stream
- SyncAPIClient
- __init__.py
- __init__.py
- _base_client.py
- _compat.py
- _exceptions.py
- _qs.py
- _streaming.py
- _types.py
- _version.py
- cached_property
- f6cccbc2:b5f1:afc1:d6b1:b929a0d4c116
- httpx
- os
- resources.beta
- resources.beta.beta
- resources.completions
- resources.messages
- resources.messages.messages
- resources.models
- typing
- typing_extensions
Source
Frequently Asked Questions
What does _client.py do?
_client.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain, AsyncAPI subdomain.
What functions are defined in _client.py?
_client.py defines 1 function(s): resources.
What does _client.py depend on?
_client.py imports 30 module(s): APIStatusError, AsyncAPIClient, AsyncStream, NotGiven, Omit, Querystring, RequestOptions, Stream, and 22 more.
What files import _client.py?
_client.py is imported by 2 file(s): __init__.py, _streaming.py.
Where is _client.py in the architecture?
_client.py is located at src/anthropic/_client.py (domain: AnthropicClient, subdomain: AsyncAPI, directory: src/anthropic).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free