Home / Class/ BetaCompactionIterationUsage Class — anthropic-sdk-python Architecture

BetaCompactionIterationUsage Class — anthropic-sdk-python Architecture

Architecture documentation for the BetaCompactionIterationUsage class in beta_compaction_iteration_usage.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  018d9533_d84d_e427_aa36_4312c74509bb["BetaCompactionIterationUsage"]
  17ce5647_6f06_0676_a4a5_e378a3f57cb1["BaseModel"]
  018d9533_d84d_e427_aa36_4312c74509bb -->|extends| 17ce5647_6f06_0676_a4a5_e378a3f57cb1
  e760d551_2987_4b5f_2096_cc5f3e072a45["beta_compaction_iteration_usage.py"]
  018d9533_d84d_e427_aa36_4312c74509bb -->|defined in| e760d551_2987_4b5f_2096_cc5f3e072a45

Relationship Graph

Source Code

src/anthropic/types/beta/beta_compaction_iteration_usage.py lines 12–31

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"""

Extends

Frequently Asked Questions

What is the BetaCompactionIterationUsage class?
BetaCompactionIterationUsage is a class in the anthropic-sdk-python codebase, defined in src/anthropic/types/beta/beta_compaction_iteration_usage.py.
Where is BetaCompactionIterationUsage defined?
BetaCompactionIterationUsage is defined in src/anthropic/types/beta/beta_compaction_iteration_usage.py at line 12.
What does BetaCompactionIterationUsage extend?
BetaCompactionIterationUsage extends BaseModel.

Analyze Your Own Codebase

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

Try Supermodel Free