files.py — anthropic-sdk-python Source File
Architecture documentation for files.py, a python file in the anthropic-sdk-python codebase. 15 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 8eb6ac96_326e_83d2_aa95_9071b1193d06["files.py"] db16b317_c933_6e0c_8b96_632fe37cd631["db16b317:c933:6e0c:8b96:632fe37cd631"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> db16b317_c933_6e0c_8b96_632fe37cd631 51c07c54_4ff0_74b8_7db0_c729c19a1d10["_types"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 51c07c54_4ff0_74b8_7db0_c729c19a1d10 22218455_fc9f_15f0_bf36_f2f9bc534c1e["_utils"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 22218455_fc9f_15f0_bf36_f2f9bc534c1e dc5958fc_e31c_9b41_a81a_ee7083122a03["_compat"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> dc5958fc_e31c_9b41_a81a_ee7083122a03 9354af22_3497_4779_4c37_3dd69fe11c79["_resource"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 9354af22_3497_4779_4c37_3dd69fe11c79 c8c92b6a_a6eb_fe5f_d876_6512fac65c0f["_response"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> c8c92b6a_a6eb_fe5f_d876_6512fac65c0f 2cd57e3b_001d_9a78_afe2_f7e1d368b549["pagination"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 2cd57e3b_001d_9a78_afe2_f7e1d368b549 2349eb67_ace6_8cba_ff21_91985e9d8d0b["types.beta"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 2349eb67_ace6_8cba_ff21_91985e9d8d0b 12327afe_c8f3_459d_2c51_57998a1955ed["_base_client"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 12327afe_c8f3_459d_2c51_57998a1955ed 3c060d61_82fb_8bc7_29b0_5459dc64ef46["types.beta.deleted_file"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 3c060d61_82fb_8bc7_29b0_5459dc64ef46 671f25ca_4289_1317_b946_89021fb46296["types.beta.file_metadata"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 671f25ca_4289_1317_b946_89021fb46296 9888261e_2ea5_1966_74ef_5ce96c78f589["types.anthropic_beta_param"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 9888261e_2ea5_1966_74ef_5ce96c78f589 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875 5692a2ea_2ef9_2536_9a5d_83254fe7d888["itertools"] 8eb6ac96_326e_83d2_aa95_9071b1193d06 --> 5692a2ea_2ef9_2536_9a5d_83254fe7d888 style 8eb6ac96_326e_83d2_aa95_9071b1193d06 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, Mapping, cast
from itertools import chain
import httpx
from ... import _legacy_response
from ..._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
from ..._utils import is_given, extract_files, maybe_transform, strip_not_given, deepcopy_minimal, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
BinaryAPIResponse,
AsyncBinaryAPIResponse,
StreamedBinaryAPIResponse,
AsyncStreamedBinaryAPIResponse,
to_streamed_response_wrapper,
to_custom_raw_response_wrapper,
async_to_streamed_response_wrapper,
to_custom_streamed_response_wrapper,
async_to_custom_raw_response_wrapper,
async_to_custom_streamed_response_wrapper,
)
from ...pagination import SyncPage, AsyncPage
from ...types.beta import file_list_params, file_upload_params
from ..._base_client import AsyncPaginator, make_request_options
from ...types.beta.deleted_file import DeletedFile
from ...types.beta.file_metadata import FileMetadata
from ...types.anthropic_beta_param import AnthropicBetaParam
__all__ = ["Files", "AsyncFiles"]
class Files(SyncAPIResource):
@cached_property
def with_raw_response(self) -> FilesWithRawResponse:
"""
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 FilesWithRawResponse(self)
@cached_property
def with_streaming_response(self) -> FilesWithStreamingResponse:
"""
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 FilesWithStreamingResponse(self)
def list(
self,
*,
after_id: str | Omit = omit,
// ... (651 more lines)
Domain
Subdomains
Classes
Dependencies
- _base_client
- _compat
- _resource
- _response
- _types
- _utils
- db16b317:c933:6e0c:8b96:632fe37cd631
- httpx
- itertools
- pagination
- types.anthropic_beta_param
- types.beta
- types.beta.deleted_file
- types.beta.file_metadata
- typing
Source
Frequently Asked Questions
What does files.py do?
files.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain, AsyncAPI subdomain.
What does files.py depend on?
files.py imports 15 module(s): _base_client, _compat, _resource, _response, _types, _utils, db16b317:c933:6e0c:8b96:632fe37cd631, httpx, and 7 more.
What files import files.py?
files.py is imported by 2 file(s): __init__.py, beta.py.
Where is files.py in the architecture?
files.py is located at src/anthropic/resources/beta/files.py (domain: AnthropicClient, subdomain: AsyncAPI, 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