Home / File/ beta_compaction_iteration_usage.py — anthropic-sdk-python Source File

beta_compaction_iteration_usage.py — anthropic-sdk-python Source File

Architecture documentation for beta_compaction_iteration_usage.py, a python file in the anthropic-sdk-python codebase. 5 imports, 2 dependents.

File python AnthropicClient 5 imports 2 dependents 1 classes

Entity Profile

Dependency Diagram

graph LR
  e760d551_2987_4b5f_2096_cc5f3e072a45["beta_compaction_iteration_usage.py"]
  c14e2467_291d_6c7c_2b25_9a24e81f8565["_models"]
  e760d551_2987_4b5f_2096_cc5f3e072a45 --> c14e2467_291d_6c7c_2b25_9a24e81f8565
  282148a6_0b81_0191_bdbc_8d40c14228ac["beta_cache_creation.py"]
  e760d551_2987_4b5f_2096_cc5f3e072a45 --> 282148a6_0b81_0191_bdbc_8d40c14228ac
  524d8b1b_8108_1804_0769_0009cff2d3fc["BetaCacheCreation"]
  e760d551_2987_4b5f_2096_cc5f3e072a45 --> 524d8b1b_8108_1804_0769_0009cff2d3fc
  89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"]
  e760d551_2987_4b5f_2096_cc5f3e072a45 --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875
  37c05070_ca59_d596_7250_de9d1939227f["typing_extensions"]
  e760d551_2987_4b5f_2096_cc5f3e072a45 --> 37c05070_ca59_d596_7250_de9d1939227f
  65f3d77c_c1b2_82e1_f9d7_1e7e05f3fdfd["__init__.py"]
  65f3d77c_c1b2_82e1_f9d7_1e7e05f3fdfd --> e760d551_2987_4b5f_2096_cc5f3e072a45
  fba56da2_5b06_a909_4eed_f4898004d572["beta_iterations_usage.py"]
  fba56da2_5b06_a909_4eed_f4898004d572 --> e760d551_2987_4b5f_2096_cc5f3e072a45
  style e760d551_2987_4b5f_2096_cc5f3e072a45 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ..._models import BaseModel
from .beta_cache_creation import BetaCacheCreation

__all__ = ["BetaCompactionIterationUsage"]


class BetaCompactionIterationUsage(BaseModel):
    """Token usage for a compaction iteration."""

    cache_creation: Optional[BetaCacheCreation] = None
    """Breakdown of cached tokens by TTL"""

    cache_creation_input_tokens: int
    """The number of input tokens used to create the cache entry."""

    cache_read_input_tokens: int
    """The number of input tokens read from the cache."""

    input_tokens: int
    """The number of input tokens which were used."""

    output_tokens: int
    """The number of output tokens which were used."""

    type: Literal["compaction"]
    """Usage for a compaction iteration"""

Dependencies

Frequently Asked Questions

What does beta_compaction_iteration_usage.py do?
beta_compaction_iteration_usage.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain.
What does beta_compaction_iteration_usage.py depend on?
beta_compaction_iteration_usage.py imports 5 module(s): BetaCacheCreation, _models, beta_cache_creation.py, typing, typing_extensions.
What files import beta_compaction_iteration_usage.py?
beta_compaction_iteration_usage.py is imported by 2 file(s): __init__.py, beta_iterations_usage.py.
Where is beta_compaction_iteration_usage.py in the architecture?
beta_compaction_iteration_usage.py is located at src/anthropic/types/beta/beta_compaction_iteration_usage.py (domain: AnthropicClient, directory: src/anthropic/types/beta).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free